Summary
Add a per-page "Edit this page" link that points directly to the source Markdown file on GitHub (or another forge). Common in MkDocs, Docusaurus, VitePress — encourages contributions.
Proposed behaviour
When repo is set in kwelea.toml, render an "Edit this page" link below the page content pointing to the source file on the default branch.
Implementation notes
- No new config needed for the common case — derive the URL from
[site] repo + [build] docs_dir + the page's FilePath
- GitHub URL pattern:
{repo}/edit/main/{docs_dir}/{relative_file_path}
- Optionally allow overriding the branch via
[site] edit_branch = "main" (default: "main")
- Render in the page template, near the pager — visible but not prominent
- Should be omitted when
repo is not set
Summary
Add a per-page "Edit this page" link that points directly to the source Markdown file on GitHub (or another forge). Common in MkDocs, Docusaurus, VitePress — encourages contributions.
Proposed behaviour
When
repois set inkwelea.toml, render an "Edit this page" link below the page content pointing to the source file on the default branch.Implementation notes
[site] repo+[build] docs_dir+ the page'sFilePath{repo}/edit/main/{docs_dir}/{relative_file_path}[site] edit_branch = "main"(default:"main")repois not set