diff options
author | Saptak S <saptak013@gmail.com> | 2020-09-01 01:34:24 +0530 |
---|---|---|
committer | Saptak S <saptak013@gmail.com> | 2020-09-01 01:34:24 +0530 |
commit | e05415b4c0db1effc02a78c8a164ce23879bbcf9 (patch) | |
tree | 0610f3c3cb58b905944010516f17eaa68d7bd394 | |
parent | beb4964b4a5f1e64dc87895ebdf53875eb9a3e84 (diff) | |
download | onionshare-e05415b4c0db1effc02a78c8a164ce23879bbcf9.tar.gz onionshare-e05415b4c0db1effc02a78c8a164ce23879bbcf9.zip |
Adds versioning HTML to the docs
-rw-r--r-- | docs/source/_templates/languages.html | 1 | ||||
-rw-r--r-- | docs/source/_templates/versions.html | 25 | ||||
-rw-r--r-- | docs/source/conf.py | 17 |
3 files changed, 42 insertions, 1 deletions
diff --git a/docs/source/_templates/languages.html b/docs/source/_templates/languages.html deleted file mode 100644 index a3ad2f29..00000000 --- a/docs/source/_templates/languages.html +++ /dev/null @@ -1 +0,0 @@ -<h1>Languages</h1>
\ No newline at end of file diff --git a/docs/source/_templates/versions.html b/docs/source/_templates/versions.html new file mode 100644 index 00000000..2b51e0a4 --- /dev/null +++ b/docs/source/_templates/versions.html @@ -0,0 +1,25 @@ +<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions"> + <span class="rst-current-version" data-toggle="rst-current-version"> + <span class="fa fa-book">OnionShare</span> + v: {{ current_version }} + <span class="fa fa-caret-down"></span> + </span> + <div class="rst-other-versions"> + {%- if versions %} + <dl> + <dt>{{ _('Versions') }}</dt> + {%- for name, url in versions %} + <dd><a href="{{ url }}">{{ name }}</a></dd> + {%- endfor %} + </dl> + {%- endif %} + {%- if langs %} + <dl> + <dt>{{ _('Languages') }}</dt> + {%- for name, code in langs %} + <dd><a href="../{{ code }}/">{{ name }}</a></dd> + {%- endfor %} + </dl> + {%- endif %} + </div> +</div>
\ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 2b067f9a..f8d79a6d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -10,10 +10,27 @@ extensions = ["sphinx_rtd_theme"] templates_path = ["_templates"] exclude_patterns = [] +languages = [ + ("العربية", "ar"), + ("Català", "ca"), + ("Dansk", "da"), + ("Nederlands", "nl"), + ("English", "en"), +] + +versions = [ + ("2.3", "/") +] + html_theme = "sphinx_rtd_theme" html_logo = "_static/logo.png" html_favicon = "_static/favicon.ico" html_theme_options = {} +html_context = { + "langs": languages, + "versions": versions, + "current_version": release +} html_static_path = ["_static"] html_css_files = ["custom.css"] html_show_sourcelink = False |