diff --git a/admin_manual/conf.py b/admin_manual/conf.py index ab735f1..5e9a793 100644 --- a/admin_manual/conf.py +++ b/admin_manual/conf.py @@ -1,30 +1,5 @@ import os import sys import datetime -sys.path.insert(0, os.path.abspath('.')) - -now = datetime.datetime.now() - -copyright = str(now.year) + ' LibreCode coop' -project = 'LibreSign Documentation' -author = 'LibreSign Team' -release = '1.0' - -extensions = [ - 'sphinx_rtd_theme', - 'sphinx_rtd_dark_mode', - 'sphinx_copybutton', -] - -templates_path = ['_templates'] -exclude_patterns = [] - -html_theme = 'sphinx_rtd_theme' -html_logo = "images/logo.png" -html_theme_options = { - 'style_nav_header_background': '#184c4e', - 'logo_only': True, - 'navigation_with_keys': True, - 'style_external_links': True, - 'version_selector': False, -} +sys.path.insert(0, os.path.abspath('../')) +from conf import * diff --git a/conf.py b/conf.py new file mode 100644 index 0000000..464e4ee --- /dev/null +++ b/conf.py @@ -0,0 +1,54 @@ +import os +import sys +import datetime +sys.path.insert(0, os.path.abspath('.')) + +now = datetime.datetime.now() + +copyright = str(now.year) + ' LibreCode coop' +project = 'LibreSign Documentation' +author = 'LibreSign Team' +release = '1.0' + +extensions = [ + 'sphinx_rtd_theme', + 'sphinx_rtd_dark_mode', + 'sphinx_copybutton', + 'notfound.extension', +] + +templates_path = ['_templates'] +exclude_patterns = [] + +html_theme = 'sphinx_rtd_theme' +html_logo = "images/logo.png" +html_theme_options = { + 'style_nav_header_background': '#184c4e', + 'logo_only': True, + 'navigation_with_keys': True, + 'style_external_links': True, + 'version_selector': False, +} +html_extra_path = ['html'] + +# -- Options for sphinx-notfound-page extension ----------------------------------- +# https://github.com/readthedocs/sphinx-notfound-page + +# content context passed to the 404 template +notfound_context = { + "title": "404 Page Not Found", + "body": """ +

Page Not Found

+

Sorry, we can't seem to find the page you're looking for.

+
Error code: 404
+ +

Here are some alternatives:

+
    +
  1. Try using the search box.
  2. +
  3. Check the content menu on the side of this page.
  4. +
  5. Regroup at our documentation homepage.

  6. +
+""", +} + +notfound_urls_prefix = None \ No newline at end of file diff --git a/developer_manual/conf.py b/developer_manual/conf.py index a30fc31..5e9a793 100644 --- a/developer_manual/conf.py +++ b/developer_manual/conf.py @@ -1,31 +1,5 @@ import os import sys import datetime -sys.path.insert(0, os.path.abspath('.')) - -now = datetime.datetime.now() - -copyright = str(now.year) + ' LibreCode coop' -project = 'LibreSign Documentation' -author = 'LibreSign Team' -release = '1.0' - -extensions = [ - 'sphinx_rtd_theme', - 'sphinx_rtd_dark_mode', - 'sphinx_copybutton', -] - -templates_path = ['_templates'] -exclude_patterns = [] - -html_theme = 'sphinx_rtd_theme' -html_logo = "images/logo.png" -html_theme_options = { - 'style_nav_header_background': '#184c4e', - 'logo_only': True, - 'navigation_with_keys': True, - 'style_external_links': True, - 'version_selector': False, -} -html_extra_path = ['html'] +sys.path.insert(0, os.path.abspath('../')) +from conf import * diff --git a/requirements.txt b/requirements.txt index aa68005..a66df4a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ sphinxcontrib-openapi==0.8.4 sphinxcontrib-redoc sphinx-autobuild sphinx-copybutton +sphinx-notfound-page docutils==0.21.2 \ No newline at end of file diff --git a/user_manual/conf.py b/user_manual/conf.py index ab735f1..5e9a793 100644 --- a/user_manual/conf.py +++ b/user_manual/conf.py @@ -1,30 +1,5 @@ import os import sys import datetime -sys.path.insert(0, os.path.abspath('.')) - -now = datetime.datetime.now() - -copyright = str(now.year) + ' LibreCode coop' -project = 'LibreSign Documentation' -author = 'LibreSign Team' -release = '1.0' - -extensions = [ - 'sphinx_rtd_theme', - 'sphinx_rtd_dark_mode', - 'sphinx_copybutton', -] - -templates_path = ['_templates'] -exclude_patterns = [] - -html_theme = 'sphinx_rtd_theme' -html_logo = "images/logo.png" -html_theme_options = { - 'style_nav_header_background': '#184c4e', - 'logo_only': True, - 'navigation_with_keys': True, - 'style_external_links': True, - 'version_selector': False, -} +sys.path.insert(0, os.path.abspath('../')) +from conf import *