diff --git a/docs/conf.py b/docs/conf.py index 97e3decb..e65eb15c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ project = "NeMo-RL" copyright = "2025, NVIDIA Corporation" author = "NVIDIA Corporation" -release = "0.0.1" +release = "0.2.1" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration @@ -74,3 +74,20 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = "nvidia_sphinx_theme" +html_theme_options = { + "switcher": { + "json_url": "../versions1.json", + "version_match": release, + }, + "extra_head": { + """ + + """ + }, + "extra_footer": { + """ + + """ + }, +} +html_extra_path = ["project.json", "versions1.json"] diff --git a/docs/documentation.md b/docs/documentation.md index 07d4e6b4..69145c06 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -5,6 +5,7 @@ - [Live Building](#live-building) - [Run Tests in Python Docstrings](#run-tests-in-python-docstrings) - [Write Tests in Python Docstrings](#write-tests-in-python-docstrings) + - [Documentation Version](#documentation-version) ## Build the Documentation @@ -71,4 +72,11 @@ def add(x: int, y: int) -> int: return x + y ``` +## Documentation Version + +The three files below control the version switcher. Before you attempt to publish a new version of the documentation, update these files to match the latest version numbers. + +* docs/versions1.json +* docs/project.json +* docs/conf.py diff --git a/docs/project.json b/docs/project.json new file mode 100644 index 00000000..d47f15ba --- /dev/null +++ b/docs/project.json @@ -0,0 +1 @@ +{"name": "nemo-rl", "version": "0.2.1"} \ No newline at end of file diff --git a/docs/versions1.json b/docs/versions1.json new file mode 100644 index 00000000..c7ed75eb --- /dev/null +++ b/docs/versions1.json @@ -0,0 +1,7 @@ +[ + { + "preferred": true, + "version": "0.2.1", + "url": "../0.2.1" + } +]