Skip to content

Commit 65068a5

Browse files
committed
doc: Add edit URL to pages
1 parent 7fec317 commit 65068a5

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

doc/index.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ template:
1212
sidebar:
1313
collapsed: false
1414
urlStrategy: pretty
15+
editBaseUrl: https://github.com/srid/haskell-flake/edit/master/doc
1516

1617
pandoc:
1718
rewriteClass:

doc/templates/hooks/after-note.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="flex items-center justify-center mt-2">
2+
<ema:metadata>
3+
<with var="template">
4+
<a class="text-gray-300 hover:text-${theme}-600 text-sm" title="Edit this page on GitHub"
5+
href="${value:editBaseUrl}/${ema:note:source-path}">
6+
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
7+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
8+
d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />
9+
</svg>
10+
</a>
11+
</with>
12+
</ema:metadata>
13+
</div>

0 commit comments

Comments
 (0)