-
Notifications
You must be signed in to change notification settings - Fork 46
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
Updating to PyData Sphinx Theme #1254
base: 1.1-dev
Are you sure you want to change the base?
Conversation
We can change the logo to PNG, and I think we have a new OCDS logo we can use. Some things to keep:
Ideally we can keep a footer for the license and privacy policy. I’ll double check if we need the OCP logo on every page or if we can just put it on the homepage. I can have a look at our layout template to see what else we had overridden. |
@jpmckinney I added a few more todo items to the top comment, LMK if I'm missing some stuff |
@jpmckinney could you explain how the language and version switchers work on the current theme? I see that you've got a |
Here's the relevant part of the theme: https://github.com/open-contracting/standard_theme/blob/open_contracting/standard_theme/layout.html#L100-L122 The switchers are implemented in Apache (you don't need to know this, but FYI): https://github.com/open-contracting/deploy/blob/main/salt/apache/files/sites/docs.conf.include#L118-L168 |
ah nice - so that should be somewhat drop-inable into a template or something? Is that what you had in mind? As an aside, this conversation sparked some renewed energy into figuring this out in the pydata theme itself, feel free to provide thoughts there if you like! pydata/pydata-sphinx-theme#360 |
Yes, that should work. I think adding the language and version as navbar items like in this pydata-sphinx-theme PR should be fine: https://github.com/pydata/pydata-sphinx-theme/pull/276/files For the linked issue, I think the approach of a versions.json file makes sense for the general case. In our case we have a fairly bespoke setup already, so we're likely to only inherit HTML/CSS changes. |
Can we add custom HTML blocks for specific pages (like
|
@megchai is this question specifically for this repository's documentation? or about the pydata theme in general? |
pydata theme :) Sorry for not clarifying |
ah gotcha - think you could open an issue in the pydata theme repository if you have questions about it? This PR is for a totally different project, it just happens to be using the pydata theme :-) |
hey @jpmckinney - I just wanted to give a heartbeat on this. I'm trying to get pydata/pydata-sphinx-theme#355 finished and then make a release, which lays some groundwork for templating that we can re-use here. We've also merged a few other PRs in that theme that I think you'll like (e.g., collapsible side-bars) 👍 |
Nice! I appreciate the update. |
I just released another patch to pydata sphinx theme to fix some bugs that were making this theme update look weird, and added the templates that I think should get this to work. Here's how the theme looks now: A few questions for @jpmckinney
By the way, any chance you could activate ReadTheDocs previews for PRs? I find that it's really helpful in reviewing design and website builds. |
We don't use ReadTheDocs. We have our own system to deploy to I'm not sure why Need to:
|
If my commits build, I'll test the switchers at https://standard.open-contracting.org/staging/theme Then, I'll discuss with our Head of Communications what CSS customizations I should prioritize. Previously, we had forked a theme to customize it. Is it straightforward to customize the theme without forking? Is it all described in the theme's docs, or are there some generic Sphinx ways of customizing themes? |
The very last step is failing ( |
@jpmckinney in general the PyData theme is designed to be pretty customizable and flexible, so I'd say we try that first and then only fork if really needed, since that'll significantly increase the maintenance burden in my opinion |
We'll be using the theme on 4 other documentation websites, which means if we edit the theme, we have to repeat it in 3 other repositories, which might exceed the maintenance burden of having a fork? What do you think? That said, we already have |
@jpmckinney ah that's good to know. I think that the approach is still the same - try to make the edits on one site, and see how nasty the customizations are. E.g., if it's just a CSS file that needs to be shared across sites, that could be centralized in one place and the other sites could pull from it, without creating a whole new theme. |
This is a PR to start updating the theme to the PyData Sphinx Theme. It is a basic "topbar-based theme".
For now, the PR is just a very basic theme switch to see how the new one looks "out of the box".
ToDo