Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Sphinx, how can I remove the title appearing in the side-bar's table of context?

Say my some.rst file looks like this:

============
My Title
============

1. Section
================

2. Section
=================

After compiling, in the resulting some.html there will be a table of contents in the side bar that appears as:

My Title

  1. Section
  2. Section

Is there a simple way to remove 'My Title' from the table of contents in some.html?

like image 770
b_dev Avatar asked Feb 02 '23 14:02

b_dev


1 Answers

I was able to solve this by using the .. raw:: html method as described above, with a slight tweak (that avoided breaking the auto-generated TOC). as described earlier, if your file only contains .. raw:: html headings, it will break the Sphinx auto-generated TOC. however, if you use .. raw:: html and add --------------------- below it, it won't show on the left-hand nav, and won't break the TOC. e.g.

so i finally accidentally figured out how to get headings to not be displayed in the left-hand TOC. if your file only contains .. raw:: html h2 headings, it will break the sphinx auto-generated TOC (as mentioned in the stackoverflow article). however, if you use .. raw:: html and --------------------- below it, it won't show on the left-hand nav, and won't break the TOC :star2: e.g.

.. raw:: html

   <h2>What Can I Do With KSQL?</h2>

---------------------
like image 114
Joel Hamill Avatar answered Feb 06 '23 14:02

Joel Hamill