-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
116 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
How it works | ||
============ | ||
|
||
Explain how the version fetching works | ||
The theme works by injecting some javascript that populates the version list | ||
at runtime. This javascript does the following: | ||
|
||
- Fetch the set of all directories in the ``gh-pages`` branch of the ``project`` repo in `github_org` | ||
- Take the `versions_branches`, and add the names of all the tags in that repo | ||
- Make a link to github.io for each version that has a directory in ``gh-pages`` | ||
|
||
You should make sure that there are appropriately named branches in the | ||
``gh-pages`` branch by doing something like | ||
https://github.com/dls-controls/sphinx_rtd_theme_github_versions/blob/master/.github/workflows/docs.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,36 @@ | ||
Configure the theme | ||
=================== | ||
|
||
Explain the options | ||
The following options can be defined in your project's ``conf.py`` file, using | ||
the :confval:`html_theme_options <sphinx:html_theme_options>` configuration option. | ||
|
||
- versions_branches | ||
- github_org | ||
For example: | ||
|
||
.. code-block:: python | ||
html_theme_options = { | ||
'versions_branches': 'main master', | ||
'github_org': 'dls-controls', | ||
} | ||
Theme Options | ||
------------- | ||
|
||
.. confval:: versions_branches | ||
|
||
The branches that should appear top of the list of versions before all the | ||
tags. Should be supplied as a space separated string. | ||
|
||
:type: str | ||
:default: ``"main master"`` | ||
|
||
.. confval:: github_org | ||
|
||
The github organization that the repo is hosted under | ||
|
||
:type: str | ||
:default: ``"dls-controls"`` | ||
|
||
All other `sphinx_rtd_theme options <sphinx_rtd_theme:configuring>` like | ||
:std:confval:`style_nav_header_background` are also supported. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.