From eb6df19281b2e08f0da2c7759c0f621eba774778 Mon Sep 17 00:00:00 2001 From: "kujiu (@ciredutemps)" Date: Wed, 3 Jun 2020 12:59:01 +0200 Subject: [PATCH] Add: Support of subsites for languages --- CHANGES | 5 ++++ docs/source/configuration.rst | 4 ++++ setup.py | 2 +- sphinx_nervproject_theme/__init__.py | 2 +- sphinx_nervproject_theme/util/extlinks.html | 26 +++++++++++++++++++++ 5 files changed, 37 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 08209b2..9b40d24 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,11 @@ Changes ======= +1.0.4 (*2020-06-03*) +==================== + +- Add external sub-sites for languages. + 1.0.3 (*2020-05-31*) ==================== diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst index 2bdbefe..6cc41ad 100644 --- a/docs/source/configuration.rst +++ b/docs/source/configuration.rst @@ -59,6 +59,9 @@ If provided, creates external links (e.g. Github) in the top right corner: "social": [ ('iconset', 'icon', 'text', 'link'), ], + "external_languages": [ + ('code', 'label to show', 'base url'), + ] "twitter_user": "", "mastodon_user": "@user@instance", "fathom": { @@ -85,6 +88,7 @@ If provided, creates external links (e.g. Github) in the top right corner: "license": { 'type': 'CC', 'subtype': 'BY-SA', + 'text': 'Text to show for non-CC licences', 'version': '4.0', 'url': 'https://creativecommons.org/licenses/by-sa/4.0/legalcode' } diff --git a/setup.py b/setup.py index 0f97435..0a5a127 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ with open("README.rst", "r") as fh: setup( name="sphinx_nervproject_theme", - version="1.0.3", + version="1.0.4", url="https://procrastinator.nerv-project.eu/nerv-project/communication/sphinx_nervproject_theme", license="EUPL 1.2", author="Kujiu", diff --git a/sphinx_nervproject_theme/__init__.py b/sphinx_nervproject_theme/__init__.py index 9a9e9b8..357b2ab 100644 --- a/sphinx_nervproject_theme/__init__.py +++ b/sphinx_nervproject_theme/__init__.py @@ -5,7 +5,7 @@ from sphinx.environment.collectors import EnvironmentCollector from sphinx import addnodes from sphinx.util.osutil import relative_uri -__version__ = (1, 0, 2) +__version__ = (1, 0, 4) class SimpleTocTreeCollector(EnvironmentCollector): diff --git a/sphinx_nervproject_theme/util/extlinks.html b/sphinx_nervproject_theme/util/extlinks.html index 012b20b..56b9c3b 100644 --- a/sphinx_nervproject_theme/util/extlinks.html +++ b/sphinx_nervproject_theme/util/extlinks.html @@ -9,3 +9,29 @@ {% endfor %} {% endif %} +{% if theme_external_languages %} + +{% endif %}