diff options
| author | Joe Mou <dev@mou.fo> | 2026-08-11 08:17:54 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-08-11 08:19:32 -0400 |
| commit | 9cef0850f8049a8f1cb11097852738de4cad4a30 (patch) | |
| tree | e2db0a0985fa66c0e53a341f931f98432fdf88a7 /cgithub/views/layout.eta | |
| parent | 0be1fdd2635fbc49d7451d3711b5772e1e9990e2 (diff) | |
Link repo header and add a "View original" link
The owner/name header in the layout now links to the owner page and the
repository root. tryRender passes the request's path and query through
as githubUrl — our URLs mirror GitHub's, so the same path is the page we
scraped — and the footer links there with rel="noreferrer", matching the
no-referrer policy used on redirects to github.com.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'cgithub/views/layout.eta')
| -rw-r--r-- | cgithub/views/layout.eta | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cgithub/views/layout.eta b/cgithub/views/layout.eta index a80bd1d..f803caf 100644 --- a/cgithub/views/layout.eta +++ b/cgithub/views/layout.eta @@ -9,7 +9,7 @@ </head> <body> <div class="box"> - <div class="repo"><%= it.repo.owner %>/<%= it.repo.name %></div> + <div class="repo"><a href="/<%= it.repo.owner %>"><%= it.repo.owner %></a>/<a href="/<%= it.repo.owner %>/<%= it.repo.name %>"><%= it.repo.name %></a></div> <pre><code>git clone https://github.com/<%= it.repo.owner %>/<%= it.repo.name %>.git git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git</code></pre> <nav> @@ -34,7 +34,7 @@ git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git</code></pr <%~ it.body %> - <footer>Generated by cgithub</footer> + <footer>Generated by cgithub · <a href="<%= it.githubUrl %>" rel="noreferrer">View original</a></footer> <script> document.addEventListener("keydown", function(e) { |
