Update project config to add cover page, log, favicon and improve output

Add a (symlinked) logo and cover image for HTML and EPUB output.
Add an author, so that metadata is set properly for EPUB.
Extend copyright statement by reusing information and adding links to
project and license.
Format today as YYYY-MM-DD instead of language specific.
Add a dummy favicon file based on the asymmetric key SVGs.

Signed-off-by: David Runge <dave@sleepmap.de>
This commit is contained in:
David Runge 2023-12-10 14:11:11 +01:00
parent 59fd5b94b3
commit 920caa543e
No known key found for this signature in database
GPG key ID: 90D4B9641E092971
6 changed files with 1345 additions and 5 deletions

View file

@ -3,11 +3,11 @@ Upstream-Name: notes
Upstream-Contact: Heiko Schaefer <heiko@schaefer.name>
Source: https://codeberg.org/openpgp/notes
Files: book/source/diag/*.png book/source/diag/*.svg
Files: book/source/diag/* book/source/drawio/* book/source/_static/epub/img/* book/source/_static/html/img/*
Copyright: 2023 The "Notes on OpenPGP" project
License: CC-BY-SA-4.0
Files: book/source/drawio/* book/input/09-sigtree.md book/source/mermaid/*.png
Files: book/input/09-sigtree.md book/source/mermaid/*.png
Copyright: 2023 The "Notes on OpenPGP" project
License: CC-BY-SA-4.0

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -6,12 +6,20 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
from datetime import date
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'OpenPGP for application developers'
copyright = '2023, The "Notes on OpenPGP" project, CC-BY-SA-4.0'
version = "0.01"
author = 'The "Notes on OpenPGP" project'
upstream_url = "https://codeberg.org/heiko/openpgp-notes"
license_url = "https://creativecommons.org/licenses/by-sa/4.0/"
copyright = f'{date.today().year}, <a href="{upstream_url}">{author}</a>, <a href="{license_url}">CC-BY-SA-4.0</a>'
version = "0.1"
suppress_warnings = [
'epub.unknown_project_files',
]
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@ -29,6 +37,9 @@ numfig = True
# number figures in flat hierarchy
numfig_secnum_depth = 0
# format today as YYYY-MM-DD instead of language specific
today_fmt = "%Y-%m-%d"
# -- Options for MyST-parser -------------------------------------------------
# https://myst-parser.readthedocs.io/en/latest/configuration.html
@ -45,6 +56,8 @@ myst_enable_extensions = [
# -- Options for EPUB output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-epub-output
epub_copyright = f'{date.today().year}, {author} ({upstream_url}), CC-BY-SA-4.0'
epub_cover = ('_static/epub/img/cover.svg', 'cover.j2')
epub_css_files = [
'epub/css/custom.css'
]
@ -58,9 +71,11 @@ html_css_files = [
('html/css/custom.css', {'priority': 1000})
]
html_favicon = '_static/html/img/favicon.ico'
html_logo = '_static/html/img/logo.svg'
html_show_sphinx = False
html_show_copyright = False
html_show_sourcelink = False
html_title = project
# https://github.com/sphinx-doc/alabaster/blob/0.x/alabaster/theme.conf
html_theme_options = {