1 parent f7c0fa6 commit de2d74aCopy full SHA for de2d74a
1 file changed
layouts/partials/docs/edit-page.html
@@ -0,0 +1,11 @@
1
+{{/* Overrides the default edit-page.html partial for complex paths */}}
2
+{{ $path := replace .File.Path .Lang "" }}
3
+{{ $path = replace $path "content." "" }}
4
+{{ $path = strings.TrimLeft "/" $path }}
5
+{{ $path = strings.TrimRight "." $path }}
6
+{{ $url := printf "%s/edit/docs/%s" $.Site.Params.BookRepo $path }}
7
+
8
+<a href="{{ $url | safeURL }}" title='{{ T "Edit this page" }}' rel="noopener" target="_blank">
9
+ {{ with partial "svgs/icon-edit.svg" . }} {{ . }} {{ end }}
10
+ {{ T "Edit this page" }}
11
+</a>
0 commit comments