PhonologicalCorpusTools / SLPAA

5 stars 0 forks source link

modify theme on Read the Docs #345

Closed kchall closed 4 months ago

kchall commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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

kvesik commented 4 months ago

Found instructions on the theme's docs page.

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

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
kchall commented 4 months ago

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.