Skip to content

dx: add “Edit this page on GitHub” links #265#271

Open
Shivampal157 wants to merge 2 commits intoOpenScienceLabs:mainfrom
Shivampal157:dx/edit-github-links-265
Open

dx: add “Edit this page on GitHub” links #265#271
Shivampal157 wants to merge 2 commits intoOpenScienceLabs:mainfrom
Shivampal157:dx/edit-github-links-265

Conversation

@Shivampal157
Copy link

@Shivampal157 Shivampal157 commented Mar 17, 2026

This PR wires up MkDocs’ edit URLs and shows a small “Edit this page on GitHub” link on docs and blog posts.

What changed
issue: #265

  • Set repo_url and edit_uri in mkdocs.yml so MkDocs exposes page.edit_url.
  • In theme/base.html, render a short “Found an issue? Edit this page on GitHub ↗” helper below the main content when page.edit_url is available.
  • Added a tiny bit of CSS in theme/css/content.css so the link looks consistent with the rest of the theme.

Notes

  • The helper lives in base.html, so it applies both to regular docs and to blog posts that use blog-post.html / other inherited layouts.
  • The link always points to this repo (OpenScienceLabs/opensciencelabs.github.io) on the main branch.

@Shivampal157
Copy link
Author

Hi @xmnlab, could you please review this PR when you have a moment and let me know if any changes are needed?

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.

1 participant