From 779dac0c9a14e9bbba674236c654aaa9580b5c09 Mon Sep 17 00:00:00 2001 From: Kohulan Date: Thu, 6 Jul 2023 15:57:11 +0200 Subject: [PATCH] fix: add Copyright info and modify theme options --- docs/conf.py | 56 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 903305b..19ea4eb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,15 +14,23 @@ import sys sys.path.insert(0, os.path.abspath("..")) +import RanDepict +from datetime import datetime # -- Project information ----------------------------------------------------- project = "RanDepict" -copyright = "2022, Otto Brinkhaus & Kohulan Rajan" +version = RanDepict.__version__ +current_year = datetime.today().year +copyright = "2021-{}, Otto Brinkhaus & Kohulan Rajan at the Friedrich Schiller University Jena".format( + current_year +) author = "Otto Brinkhaus & Kohulan Rajan" - -# The full version, including alpha/beta/rc tags -release = "1.1.8" +rst_prolog = """ +.. |current_year| replace:: {} +""".format( + current_year +) # -- General configuration --------------------------------------------------- @@ -35,8 +43,8 @@ "sphinx.ext.autosummary", "nbsphinx", "sphinx.ext.mathjax", - 'sphinx.ext.githubpages', - "sphinx.ext.viewcode" + "sphinx.ext.githubpages", + "sphinx.ext.viewcode", ] # Add any paths that contain templates here, relative to this directory. @@ -46,10 +54,10 @@ # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = '.rst' +source_suffix = ".rst" # The master toctree document. -master_doc = 'index' +master_doc = "index" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -65,29 +73,46 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'furo' +html_theme = "furo" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # +# html_theme_options = { "light_css_variables": { - "color-brand-primary": "red", - "color-brand-content": "#CC3333", - "color-admonition-background": "orange", + "color-brand-primary": "#64C0D1", + "color-brand-content": "#E37B74", + "color-code-background": "#F8F8F8", + "color-code-border": "#E37B74", + "color-admonition-background": "#FEECEC", + "color-link": "#E37B74", + "color-pre-background": "#F8F8F8", + "color-pre-border": "#E37B74", + }, + "dark_css_variables": { + "color-brand-primary": "#64C0D1", + "color-brand-content": "#E37B74", + "color-code-background": "#222222", + "color-code-border": "#E37B74", + "color-admonition-background": "#331E1C", + "color-link": "#E37B74", + "color-pre-background": "#222222", + "color-pre-border": "#E37B74", }, "sidebar_hide_name": True, "navigation_with_keys": True, "top_of_page_button": "edit", } + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] -html_favicon = '_static/Untitled-1.png' -html_logo = '_static/Untitled-1.png' +html_static_path = ["_static"] +html_favicon = "_static/Untitled-1.png" +html_logo = "_static/Untitled-1.png" # Custom sidebar templates, must be a dictionary that maps document names # to template names. # @@ -95,4 +120,3 @@ # defined by theme itself. Builtin themes are using these templates by # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', # 'searchbox.html']``. -