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

Sidebar shows previous/next links with inconsistent format #183

Open
datapythonista opened this issue Jun 12, 2018 · 4 comments
Open

Sidebar shows previous/next links with inconsistent format #183

datapythonista opened this issue Jun 12, 2018 · 4 comments

Comments

@datapythonista
Copy link

I'm working on using this theme for the pandas documentation, and I'm getting something which seems wrong in the sidebar (see attachment).

pandas_doc

The links to the previous and next sections seem to lack css formatting. Not even sure why they appear, as they are not in the theme examples and I don't see anything on my config to show them.

You can see the conf.py file I'm using here: https://github.com/datapythonista/pandas/blob/doc_home/doc/source/conf.py

And the page rendered here: https://datapythonista.github.io/docs/new-pandas-doc/overview.html

Thanks! And thanks for the amazing work with this theme, pandas documentation will look amazing with it. :)

@datapythonista datapythonista changed the title Sidebar shows previous/next links with inconsistent formet Sidebar shows previous/next links with inconsistent format Jun 12, 2018
@svenevs
Copy link
Collaborator

svenevs commented Jun 13, 2018

To clarify, yes you want the "next" and "previous" pages to link, or no you do not?

https://github.com/datapythonista/pandas/blob/bd95c4b9f99b15d222461b29363452706934b59d/doc/source/conf.py#L205

That should be making them go away...meaning we have a problem here...

Edit wait a second, no that only affects the navbar sorry. I'm looking through our templates right now, the <ul> is getting ended too early...

@svenevs
Copy link
Collaborator

svenevs commented Jun 13, 2018

Ok I've found the problem but I'm not sure what the solution is. It's coming from relations.html.

It seems we've been deprecated, though I don't know what the new world order is: https://github.com/sphinx-doc/sphinx/blob/1c3eadcf61ab2725801218b207640bc7634b0f8f/sphinx/themes/basic/layout.html#L67

The issue is that there is a discrepancy between the use-cases of relations.html, how we use it in the navbar (the bare <li> are OK), and how it is now being added to the sidebar (bare <li> is not OK, since the <ul> already got ended [somehow...]). I'm going to see if I can get a band-aid working for this later tonight.

@ashafer01
Copy link

I think its entirely up to the user's conf.py whether or not the sidebar is old or new style. And for the purposes of this issue, commenting out the definition I suspect is what triggered the old-style behavior.

It looks like the way our layout.html is written fully expects that the conf.py contains a new-style definition (such as mine). I think my PR (#182) coupled with a doc update mentioning this is the way to go.

@johentsch
Copy link

johentsch commented May 27, 2024

This issue appeared for me after upgrading to the current sphinx==7.3.7. Notably, with all versions between 5.3.0 and 7.2.0 that I've tried, my page never used to have a sidebar at all. With the latest version, suddenly I have a new sidebar and it has the 'previous' and 'next' links screwed as reported here. The same problem exists on the sphinx-themes.org.

Since I never wanted the sidebar in the first place, how can I deactivate it, please? The documentation does not contain the strings sidebar nor side bar.

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

4 participants