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

modify theme on Read the Docs #345

Closed
kchall opened this issue Jul 5, 2024 · 4 comments
Closed

modify theme on Read the Docs #345

kchall opened this issue Jul 5, 2024 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@kchall
Copy link
Member

kchall commented Jul 5, 2024

So, despite my effort to switch the theme in the conf.py file (https://github.com/PhonologicalCorpusTools/SLPAA/blob/main/docs/source/conf.py) by commenting out line 74 and activating line 76, nothing seems to have actually changed on Read the Docs.

That is, I'm still seeing the following layout:
image

...when I want it to revert to the sphinx_rtd_theme layout, which should look something like (from the PCT documentation):
image

I did this several hours ago, and I know it sometimes takes RtD a while to catch up with GitHub edits, but this seems excessive...am I missing something?

@kvesik kvesik self-assigned this Jul 5, 2024
@kvesik
Copy link
Collaborator

kvesik commented Jul 5, 2024

If I just type in corpustools.readthedocs.io then I get the same ("default") theme:
image
PCT's current entry in conf.py for html_theme is "default".

But going to the stable/index.html page for PCT like Kathleen did shows the sphinx theme.

That stable/index.html page doesn't exist for SLP-AA, possibly because it's associated with a specific PCT release?

I will look into it!

@kvesik kvesik added the documentation Improvements or additions to documentation label Jul 6, 2024
@kvesik
Copy link
Collaborator

kvesik commented Jul 6, 2024

Update: turns out the readthedocs build is failing with the new theme.

@kvesik
Copy link
Collaborator

kvesik commented Jul 6, 2024

Found instructions on the theme's docs page.

  • added 'sphinx_rtd_theme' to extensions list in conf.py
    • didn't work

Also found some discussion from stackoverflow and a readthedocs github issue and

  • uncommented reference to requirements.txt in the .readthedocs.yaml file, and added a requirements.txt file to the docs directory, containing just a reference to the sphinx theme
    • works!

Summary

In order to change the theme, four updates needed to be made:

  1. change the value of the html_themes variable in SLPAA/docs/source/conf.py
    • this will have to be edited any time we want to change the theme
  2. uncomment the last section ("python:") of SLPAA/.readthedocs.yaml
    • this does not have to be done again
  3. add a requirements file for building the documentation SLPAA/docs/source/requirements.txt
    • this does not have to be done again
  4. add "sphinx-rtd-theme" to the requirements file
    • this will have to be edited/added to any time we want to change the theme

@kvesik kvesik closed this as completed Jul 6, 2024
@kchall
Copy link
Member Author

kchall commented Jul 6, 2024

Woohoo, thank you, @kvesik ! Sorry it was more of a hassle than it should be -- but I definitely like the navigability of this theme better.

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

No branches or pull requests

2 participants