From 144bda24c48e17f0ac3b19c90050de7b702456e7 Mon Sep 17 00:00:00 2001 From: Max Magorsch Date: Thu, 23 Jan 2020 15:01:58 +0100 Subject: Make the license configurable Add two new html_theme_options (license and license_link) which can be used to configure the license that will be displayed in the footer. Further information about the option are included in the README. By default the CC-BY-SA-4.0 will be used. Resolves: #2 Signed-off-by: Max Magorsch --- README.md | 12 ++++++++++++ tyrian_sphinx_theme/_version.py | 2 +- tyrian_sphinx_theme/layout.html | 2 +- tyrian_sphinx_theme/theme.conf | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 49b5e12..878bf23 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ A Sphinx theme based on Tyrian (the new unified gentoo.org theme). - [navigationlinks_top](#navigationlinks_top) - [navigationlinks_bottom](#navigationlinks_bottom) - [navigationlinks_navbar](#navigationlinks_navbar) + - [license](#license) + - [license_link](#license_link) - [Contributors](#contributors) ## Installation @@ -56,5 +58,15 @@ $ sphinx-build -b singlehtml ... - long: display the links using "<< chapter-heading chapter-heading >>" - none *(default)*: don't display the navigation links in the navbar at all +### license + +- the license that will be display in the footer +- CC-BY-SA-4.0 *(default)* + +### license_link + +- the link to the license that will be used when clicking on the license in the footer +- https://creativecommons.org/licenses/by-sa/4.0/ *(default)* + ## Contributors * [Max Magorsch](mailto:max@magorsch.de) \ No newline at end of file diff --git a/tyrian_sphinx_theme/_version.py b/tyrian_sphinx_theme/_version.py index e388a85..895d1fc 100644 --- a/tyrian_sphinx_theme/_version.py +++ b/tyrian_sphinx_theme/_version.py @@ -1,2 +1,2 @@ -__version_info__ = (0, 0, 1) +__version_info__ = (0, 0, 2) __version__ = ".".join(map(str, __version_info__)) diff --git a/tyrian_sphinx_theme/layout.html b/tyrian_sphinx_theme/layout.html index 2d451fb..2d9da1b 100644 --- a/tyrian_sphinx_theme/layout.html +++ b/tyrian_sphinx_theme/layout.html @@ -383,7 +383,7 @@ Gentoo is a trademark of the Gentoo Foundation, Inc. The contents of this document, unless otherwise expressly stated, are licensed under the - CC-BY-SA-3.0 license. + {{ theme_license }} license. The Gentoo Name and Logo Usage Guidelines apply. diff --git a/tyrian_sphinx_theme/theme.conf b/tyrian_sphinx_theme/theme.conf index 4607648..60ccefb 100644 --- a/tyrian_sphinx_theme/theme.conf +++ b/tyrian_sphinx_theme/theme.conf @@ -8,6 +8,8 @@ sidebar = right navigationlinks_top = none navigationlinks_bottom = long navigationlinks_navbar = none +license = CC-BY-SA-4.0 +license_link = https://creativecommons.org/licenses/by-sa/4.0/ logo = logo_name = false logo_text_align = left -- cgit v1.2.3-65-gdbad