Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unlimited depth sidebar #135

Open
sonictk opened this issue Jul 14, 2015 · 3 comments
Open

Unlimited depth sidebar #135

sonictk opened this issue Jul 14, 2015 · 3 comments

Comments

@sonictk
Copy link

sonictk commented Jul 14, 2015

Hi all:

I'm trying to look for other themes for Sphinx other than readthedocs, and came across this repo. I'm trying to make a sidebar with a global depth (i.e. like readthedocs theme where I can access every level of the documentation through the sidebar), but I'm running into issues where the sidebar doesn't show the nested sub-levels.

In my conf.py, I have the following:

html_sidebars = {'**': ['custom_sidebar.html', 'searchbox.html']}

And the custom_sidebar.htmlbasically contains:

<ul class="globaltoc">{{ toctree(maxdepth=theme_globaltoc_depth|toint, collapse=False,includehidden=theme_globaltoc_includehidden|tobool) }}</ul>

My documentation structure is split across several index files, like so:

root
│ about.rst
│ conf.py
│ faq.rst
│ glossary.rst
│ index.rst

├───guide
│ │ index.rst
│ │
│ ├───guide_2d
│ │ concept.rst
│ │ index.rst
│ │
│ ├───guide_3d
│ │ animation.rst
│ │ index.rst
│ │ modeling.rst
│ │ texturing.rst
│ │
│ ├───guide_ui
│ │ index.rst
│ │
│ └───pipeline
│ index.rst
│ overview.rst
│ processes.rst

├───_resources
│ └───images

├───_static
├───_templates
│ custom_sidebar.html

└───_themes

Is it possible to get the sidebar to list out all items instead of just the guide?

Thanks!

@ryan-roemer
Copy link
Owner

Hi @sonictk !

Is this your issue? #88

Or, can you point me to an online demo + source code and explain what you'd like to see happen?

@sonictk
Copy link
Author

sonictk commented Jul 15, 2015

Hi @ryan-roemer:

I'm not quite sure it is...so basically, when I build on readthedocs theme, I get this as my sidebar:

If I use a sphinx bootstrap theme, I get this:

The sidebar doesn't seem to have the ability to have the same depth level as the readthedocs theme. It only works for everything being in the same reST file and seperated by sections, but not if I start using multiple index files with multiple table of contents directives.

Is there any way to emulate the readthedocs theme behaviour for the sidebar and drop-down menus?

@ryan-roemer
Copy link
Owner

Is there any way to emulate the readthedocs theme behaviour for the sidebar and drop-down menus?

For the sidebar, our example does have nesting display capabilities, but I don't believe that it's hooked up to a sophisticated JS drilldown -- you can look at https://github.com/ryan-roemer/sphinx-bootstrap-theme/blob/master/demo/source/conf.py#L191-L193 and perhaps play with that?

For navbar drop-down menus, there are no longer nested menus because Bootstrap 3 explicitly dropped nested menus. See #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants