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

header links placed differently on RTD #156

Closed
chrispyles opened this issue Apr 19, 2020 · 12 comments
Closed

header links placed differently on RTD #156

chrispyles opened this issue Apr 19, 2020 · 12 comments

Comments

@chrispyles
Copy link

chrispyles commented Apr 19, 2020

When I create docs with this theme and push to readthedocs, the header is spaced differently and is missing the home link. Any ideas why this is the case? The docs can be found here and the RTD is here

Local build output:

Screen Shot 2020-04-19 at 1 21 48 PM

RTD Build Output:

Screen Shot 2020-04-19 at 1 21 24 PM

@choldgraf
Copy link
Collaborator

hmmm - are you running on the pypi version, or are you installing from master? There have been many changes on master that address the kinds of things you're seeing...

@chrispyles
Copy link
Author

I'm installing with git+https://github.com/pandas-dev/pydata-sphinx-theme.git@master, so from master

@choldgraf
Copy link
Collaborator

Hmm the RTD output looks closer to master than the local output (because master now caps the max width of the content, and it looks like your local build is taking up the full screen width). I also wonder if this might be an intersection with not using a logo? Could you see if adding a logo changes any behavior?

@chrispyles
Copy link
Author

This is what I get on local when using a logo. I also updated my local installation from github before generating this.

If max-width is the issue, do you know of a way that I can turn off the cap easily?

Screen Shot 2020-04-19 at 7 56 10 PM

@choldgraf
Copy link
Collaborator

Hmmm let me take a look at your site tomorrow morning, I need to log off for tonight. I don't think that max width is the issue per-se, just that it is indicative of running on master

@choldgraf
Copy link
Collaborator

I just checked out the repository but can't find a branch where you are using the pydata-sphinx-theme. Can you give a link so I can try it out?

@jorisvandenbossche
Copy link
Member

This is what I get on local when using a logo. I also updated my local installation from github before generating this.

From the screenshot you show, I don't think this is using the latest master version.
We indeed added a limit to the maximum width of the main text, which your screenshot doesn't show.

If max-width is the issue, do you know of a way that I can turn off the cap easily?

So we limited the max-width in the idea that this improved readability on big screens. However, with the current solution/layout, this also limits the horizontal space that is available for the links in the header navbar, which can give problems if you have many items in there (as you have).

So if that turns out to be a problem, we should certainly look into making this somewhat easy to override / customize.
One option would be to provide a way to configure this max-width threshold.
Another option could also be to have a way to still use the full screen width for the navbar, while limiting the content to a max-width.

@jorisvandenbossche
Copy link
Member

BTW, since you all have single pages without further nesting, you might also be interested in a layout that puts those links on the side (eg https://contextily.readthedocs.io/en/latest/, xref #90)

@chrispyles
Copy link
Author

The branch using pydata-sphinx-theme is prep-v1: https://github.com/ucbds-infra/otter-grader/tree/prep-v1

Also I will look into the contextily docs theme, thanks!

@jorisvandenbossche
Copy link
Member

Also I will look into the contextily docs theme, thanks!

So that's using some custom layout in the contextily repo. But another option would also be to try out https://github.com/ExecutableBookProject/sphinx-book-theme (which will work better out of the box). Both do something similar: at theme based on this one but navigation in the left sidebar.
Personally, I would like to include something like that in this repo, but that's being discussed a bit at #90

@jpmckinney
Copy link
Contributor

Dupe #163 ?

@12rambau
Copy link
Collaborator

This is impossible to reproduce with the latest 0.9 version (as we changed how to deal with logoless websites since you posted your issue). Some of the problem you raised were effectively solved in #163.

Please feel free to open a new issue if you still face problem with the latest releases.

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

5 participants