Merge pull request 'Add OpenGraph metadata' (#203) from add-opengraph into draft

Reviewed-on: https://codeberg.org/openpgp/notes/pulls/203
This commit is contained in:
heiko 2023-12-12 19:53:40 +00:00
commit 4510957574
5 changed files with 8 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View file

@ -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'