Skip to content

Commit

Permalink
Add opengraph plugin
Browse files Browse the repository at this point in the history
This makes sharing the docs also show a nice preview image etc
  • Loading branch information
razzeee authored and TingPing committed Jan 16, 2024
1 parent d63b3ce commit 263a386
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ To build the docs locally, first install ``sphinx``, ``furo`` and
``sphinx-copybutton``.
On Fedora this can be with::

sudo dnf install python3-sphinx python3-furo python-sphinx-copybutton
sudo dnf install python3-sphinx python3-furo python-sphinx-copybutton python-sphinxext-opengraph

On Debian this can be with::

sudo apt install python3-sphinx python3-furo python-sphinx-copybutton
sudo apt install python3-sphinx python3-furo python-sphinx-copybutton python-sphinxext-opengraph

Then run ``make html`` in the ``docs`` directory.

Expand Down
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinxext.opengraph',
'sphinx_copybutton',
]

Expand Down Expand Up @@ -169,3 +170,7 @@
author, 'Flatpak', 'One line description of project.',
'Miscellaneous'),
]

# -- Options for OpenGraph ---------------------------------------------------

ogp_site_url = 'https://docs.flatpak.org/'
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Sphinx
furo
sphinxext-opengraph
sphinx-copybutton

0 comments on commit 263a386

Please sign in to comment.