Fix the edit link for API documentation
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
Please register or sign in to comment