pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

Option to skip an index.rst landing page and directly go to first subpage

Open jorisvandenbossche opened this issue 4 years ago • 2 comments

Currently, the index.rst pages that hold the toctree of a sub-part of the doc website, are often very bare pages with just that toctree and are not very useful otherwise.

Sometimes it might be nice to add more custom content on those pages (however, you then run into problems when wanting to add new titles, see #59). But sometimes it might also be nice to have the option to just skip that "landing page" with the toctree, and directly go to the first sub-page when clicking on it.

For example in the pandas demo docs, we have this section with comparisons to other languages:

image

It could be nice to have the option to say: "for this index.rst, only use me to get the toctree information, but for the rest don't show me as a page" (and eg directly select to first sub page)

jorisvandenbossche avatar Nov 25 '19 10:11 jorisvandenbossche

As you describe in https://github.com/pydata/pydata-sphinx-theme/issues/192#issuecomment-635885602, one option is to just add content to the page.

If you want to remove the page entirely, when the page is not top-level, can't you just split the toctree into multiple toctrees in getting_started/index.rst, so that there is one toctree that lists the comparison/... pages, with a :caption: Comparison with other tools?

When the page is top-level (i.e. appears in navbar), a (janky) solution is for the top-level index.rst to list the first page of the section with Section title <first-page> in the toctree, and then that first page would have a toctree for all pages in its section, with self at the top, so that it still appears in the sidebar.

jpmckinney avatar May 14 '21 16:05 jpmckinney

In the current implementation, the index.rst page can be a very rich and complex page, with no sidebars. You can also specify the entry point of your documentation by setting the link of your brand in the header bar. In this context, is it still a wanted feature ?

12rambau avatar Aug 28 '22 11:08 12rambau

I'll close this issue for now asd there is no activity since 2022. Please reopen if you still want to see it implemented.

12rambau avatar Jul 22 '23 12:07 12rambau