Add OpenGraph metadata

This commit is contained in:
Wiktor Kwapisiewicz 2023-12-12 15:12:47 +01:00 committed by David Runge
parent a17a3a30f2
commit edaf62f833
No known key found for this signature in database
GPG key ID: 90D4B9641E092971
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'