parent
7c26d9b8b7
commit
02ba1afcee
1 changed files with 2 additions and 1 deletions
|
@ -13,7 +13,8 @@
|
||||||
|
|
||||||
{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }}
|
{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }}
|
||||||
<div>
|
<div>
|
||||||
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ .Site.Params.contentDir | default "content" }}/{{ replace .File.Path "\\" "/" }}" target="_blank" rel="noopener">
|
{{- $bookFilePath := (strings.TrimPrefix hugo.WorkingDir .Page.File.Filename | path.Join) -}}
|
||||||
|
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}{{ ($bookFilePath) }}" target="_blank" rel="noopener">
|
||||||
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="" />
|
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="" />
|
||||||
<span>{{ i18n "Edit this page" }}</span>
|
<span>{{ i18n "Edit this page" }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue