westurner / wiki

https://westurner.org/wiki
https://westurner.org/wiki
45 stars 19 forks source link

Why are there two Tables of Contents in the Sphinx renders? #4

Open westurner opened 9 years ago

westurner commented 9 years ago

From a given source .rest file:

There's the GitHub wiki view, which does not add a TOC sidebar, necessitating an explicit .. contents:: directive.

And there's the gh-pages Sphinx-rendered view, which does have TWO Tables of Contents:

westurner commented 9 years ago

Could the .. contents:: directives be stripped out before Sphinx render-time?

That's probably possible. At this time, this is just barely good enough for my purposes.

westurner commented 9 years ago

Solved by adding

div#contents {
    display: none;
}

to https://github.com/westurner/wiki/blob/master/_static/css/local.css with app.add_stylesheet("css/local.css") in https://github.com/westurner/wiki/blob/master/conf.py .