From 305a4995c7abed2f2a767679ca83974410b9295f Mon Sep 17 00:00:00 2001 From: Minijackson Date: Fri, 13 Dec 2024 08:59:37 +0100 Subject: [PATCH] docs: add opengraph metadata to HTML website better referencing in search engines, and nicer "social media" sharing previews --- docs/conf.py | 8 ++++++++ pkgs/docs/default.nix | 1 + 2 files changed, 9 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index e723fc3..916d85c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,6 +30,7 @@ "sphinx.ext.githubpages", "sphinx_copybutton", "sphinxcontrib_nixdomain", + "sphinxext.opengraph", ] templates_path = ["_templates"] @@ -126,3 +127,10 @@ def nix_linkcode_resolve(path: str) -> str: ] man_show_urls = True + +# -- Options for OpenGraph --------------------------------------------------- +# https://sphinxext-opengraph.readthedocs.io/en/latest/ + +ogp_site_url = html_baseurl +ogp_image = "_static/logo.svg" +ogp_image_alt = "EPNix logo" diff --git a/pkgs/docs/default.nix b/pkgs/docs/default.nix index 6075e8e..c5578cf 100644 --- a/pkgs/docs/default.nix +++ b/pkgs/docs/default.nix @@ -103,6 +103,7 @@ in sphinx sphinx-copybutton sphinxcontrib-nixdomain + sphinxext-opengraph ]) ++ [ installShellFiles