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

Fix: Sphinx Theme CSS file missing on doc pages #681

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

semmel
Copy link
Contributor

@semmel semmel commented Mar 12, 2024

Without knowing how to use Read the Docs I applied some instructions from here
https://sphinx-rtd-theme.readthedocs.io/en/stable/installing.html

Still missing is pip install sphinx_rtd_theme. I don't know where to add that 🤷

I noticed theme.css is no longer used for https://mostcore.readthedocs.io/en/latest/api.html

On waybackmachine theme.css (/* sphinx_rtd_theme version 0.4.3 | MIT license */ /* Built 20190212 16:02 */) is used.

w/o the theme imo the docs look quite ugly now:
Screenshot 2024-03-12 at 18 39 07

@briancavalier
Copy link
Member

Hey @semmel 👋 Thanks for helping to fix this! With the other recent doc updates, I found that RTD had changed and now requires a config file. Without it, RTD refused to build and deploy the update docs 😞. So I just copied and pasted RTD's example starter config just to get the docs to build again, and hadn't had time to look into the theme problem.

Still missing is pip install sphinx_rtd_theme. I don't know where to add that

This page says:

Install the sphinx_rtd_theme package (or add it to your requirements.txt file):

The parenthetical seems like the key, but that page doesn't make it clear where requirements.txt should like. I searched around a bit and found this example repo, which was a huge help. It has a requirements.txt inside the docs dir, so it seems like we just need to do a couple simple things to get this PR merged:

  1. Add a requirements.txt in the docs folder
  2. Add the "right" dependencies to it. I don't know if just adding sphinx-rtd-theme is enough, or if we should just add everything from the example repo's requirements.txt. We could try the latter and see what happens.

@semmel
Copy link
Contributor Author

semmel commented Mar 28, 2024

I added the requirements.txt as in the RTD Tutorial Template.

It seems to work now: The doc pages generated from my fork look fine.

Copy link
Member

@briancavalier briancavalier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@semmel Awesome. Thank you very much for this!

@briancavalier briancavalier merged commit 8501f05 into mostjs:master Mar 29, 2024
2 checks passed
@briancavalier
Copy link
Member

Docs look great again 🎉

Screen Shot 2024-03-28 at 9 27 37 PM

@semmel semmel deleted the doc-theme branch April 2, 2024 10:17
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

Successfully merging this pull request may close these issues.

None yet

2 participants