Skip to content

feat(docs): add "Edit on GitHub" link to all manuals - #123

Merged
vitormattos merged 1 commit into
LibreSign:mainfrom
matheusa1:feat/28-edit-on-github
Nov 2, 2026
Merged

vitormattos merged 1 commit into
LibreSign:mainfrom
matheusa1:feat/28-edit-on-github

Conversation

@matheusa1

Copy link
Copy Markdown
Contributor

Requested by Matheus

Closes #28

Implementation details

Every manual page now shows the sphinx_rtd_theme "Edit on GitHub" link at the top, pointing to the matching .rst source in LibreSign/documentation, like the Nextcloud documentation.

Sphinx configuration

Central configuration (root conf.py)

New html_context:

html_context = {
    'display_github': True,
    'github_user': 'LibreSign',
    'github_repo': 'documentation',
    'github_version': 'main',
    'conf_py_path': '/',
}

Per-manual configuration

main/, user_manual/, admin_manual/ and developer_manual/ already do from conf import *. Each one now overrides only its own path:

html_context = {**html_context, 'conf_py_path': '/<manual>/'}

Example generated link for user_manual/start.rst: https://github.com/LibreSign/documentation/blob/main/user_manual/start.rst.

Impact

Area Impact
All manuals Each page shows the "Edit on GitHub" link at the top right.
Generated link Uses blob/ (theme default), not edit/: opens the file on GitHub, one click from the edit button.
Fixed branch The link always targets main.
Content and build No page, route or structure changes. Configuration only.

Signed-off-by: Matheus Andrade <2002matheus@gmail.com>
@vitormattos
vitormattos merged commit d2e7b49 into LibreSign:main Nov 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement "Edit on GitHub"

2 participants