diff --git a/.woodpecker/epub.yml b/.woodpecker/epub.yml index 07c6951..658da4c 100644 --- a/.woodpecker/epub.yml +++ b/.woodpecker/epub.yml @@ -18,7 +18,7 @@ steps: image: archlinux:latest commands: - pacman -Sy --needed --noconfirm archlinux-keyring - - pacman -Syu --needed --noconfirm epubcheck inkscape make patch python-myst-parser python-sphinx + - pacman -Syu --needed --noconfirm epubcheck inkscape make patch python-myst-parser python-sphinx python-sphinxext-opengraph # fix sphinx: https://github.com/sphinx-doc/sphinx/issues/11598 - patch -Np1 -d /usr/lib/python3.11/site-packages/ -i "$(pwd)/book/patches/sphinx-11766.patch" - make -C book epub-check diff --git a/.woodpecker/links.yml b/.woodpecker/links.yml index 825d37f..f592367 100644 --- a/.woodpecker/links.yml +++ b/.woodpecker/links.yml @@ -19,5 +19,5 @@ steps: image: archlinux:latest commands: - pacman -Sy --needed --noconfirm archlinux-keyring - - pacman -Syu --needed --noconfirm inkscape lychee make python-myst-parser python-sphinx + - pacman -Syu --needed --noconfirm inkscape lychee make python-myst-parser python-sphinx python-sphinxext-opengraph - make -C book html-linkcheck diff --git a/Dockerfile b/Dockerfile index 020653e..f933425 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /book # fix EPUB rendering: https://github.com/sphinx-doc/sphinx/issues/11598 RUN \ pacman -Sy --needed --noconfirm archlinux-keyring \ - && pacman -Syu --needed --noconfirm inkscape make patch python-myst-parser python-sphinx \ + && pacman -Syu --needed --noconfirm inkscape make patch python-myst-parser python-sphinx python-sphinxext-opengraph \ && patch -Np1 -d /usr/lib/python3.11/site-packages/ -i /book/patches/sphinx-11766.patch \ && make epub html diff --git a/book/source/_static/html/img/logo.png b/book/source/_static/html/img/logo.png new file mode 100644 index 0000000..4d3a395 Binary files /dev/null and b/book/source/_static/html/img/logo.png differ diff --git a/book/source/conf.py b/book/source/conf.py index 69e5bc7..7dd729c 100644 --- a/book/source/conf.py +++ b/book/source/conf.py @@ -26,6 +26,7 @@ suppress_warnings = [ extensions = [ 'myst_parser', + 'sphinxext.opengraph', ] source_suffix = ['.md', '.rst'] @@ -88,3 +89,7 @@ html_theme_options = { 'show_relbars': 'yes', 'show_powered_by': False, } + +# https://github.com/wpilibsuite/sphinxext-opengraph#simple-config +ogp_site_url = 'https://openpgp.dev/book/' +ogp_image = '_static/logo.png'