Skip to content

Commit

Permalink
Add support for toctree captions
Browse files Browse the repository at this point in the history
I do not know if that was supported with doctrine/rst-parser, but there
is such a thing as a caption option for the toctree directive, and it
seems that phpDocumentor/guides supports it.
When I tried it, it produced a "p" element with a caption class.
Adding support for that means we could get rid of the toc and tocheader
directly.
These custom directives appear to be the directives that cause the most
unfixable warnings (unfixable without a custom guides extension, that
is).
We might end up with an extension anyway if there are other warnings,
but I think this could be a nice simplification.
  • Loading branch information
greg0ire committed Oct 1, 2024
1 parent f5d05ec commit 220feb1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ h6 {
color: #fff;
}

.sidebar-sticky .toc .caption {
padding: 8px;
font-size: 20px;
background-color: $doctrine-dark-blue;
margin-bottom: 0;
color: #fff;
}

/** 1st Level */
.sidebar-sticky .toc ul {
list-style-type: none;
Expand Down

0 comments on commit 220feb1

Please sign in to comment.