Skip to content

Commit af82c93

Browse files
committed
Merge pull request #190 from agjohnson/sphinx-caption
Add support for Sphinx 1.3 toctree captions
2 parents 8f6e950 + 4dfd2fe commit af82c93

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

demo_docs/source/index.rst

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ Contents:
1818

1919
demo
2020
list
21+
22+
.. toctree::
23+
:maxdepth: 2
24+
:caption: This is an incredibly long caption for a long menu
25+
2126
long
2227

2328
Maaaaath!

sass/_theme_layout.sass

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@
2424
padding: 0 $base-font-size
2525

2626
.wy-menu-vertical
27-
header
27+
header, p.caption
2828
height: $base-font-size * 2
2929
display: inline-block
3030
line-height: $base-font-size * 2
3131
padding: 0 $gutter
32+
margin-bottom: 0
3233
display: block
3334
font-weight: bold
3435
text-transform: uppercase
3536
font-size: 80%
36-
color: $menu-logo-color
37+
color: $gray
3738
white-space: nowrap
3839

3940
ul

sass/_theme_rst.sass

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
display: block
100100

101101
// This is the #href that shows up on hover. Sphinx's is terrible so I hack it away.
102-
h1, h2, h3, h4, h5, h6, dl dt
102+
h1, h2, h3, h4, h5, h6, dl dt, p.caption
103103
.headerlink
104104
display: none
105105
visibility: hidden

sphinx_rtd_theme/static/css/theme.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sphinx_rtd_theme/static/css/theme.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)