Skip to content
Snippets Groups Projects
Forked from Platform / Development / swh-docs
Source project has a limited visibility.
Jérémy Bobbio (Lunar)'s avatar
Jérémy Bobbio (Lunar) authored
The `swh-docs` building process symlinks the documentation for
individual modules into the `swh-docs` tree to generate a single Sphinx
project. The “Edit this page” link therefore needs to point to the right
repository on GitLab in these case.

We try to implement this using the `edit_page_url_template` option
of the PyData theme, see: https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/source-buttons.html#custom-edit-url

We can take advantage that it’s a Jinja2 template to recognize
that API documentation file path starts with `devel/swh-` and adjust
accordingly. This is a bit of a hack, but we can hope it’ll be enough as
long as we stay consistent.

- Closes: swh/devel/swh-docs#4735
af594297
History
Name Last commit Last update