Skip to content

Add "Edit this page" link to each page #3

Description

@engineervix

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions