mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-22 03:19:25 +00:00
replacing any backslashes with forward slashes for edit file url(#116)
Seems to be a Windows related thing. `.File.Path` returns a path with backslashes this adds a replace to make those forward slashes. This appears to fix #115
This commit is contained in:
parent
e30504802e
commit
f5a52e6ed1
@ -17,7 +17,7 @@
|
||||
|
||||
{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }}
|
||||
<div>
|
||||
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ .File.Path }}" target="_blank">
|
||||
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ replace .File.Path "\\" "/" }}" target="_blank">
|
||||
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="Edit" />
|
||||
<span>{{ i18n "Edit this page" }}</span>
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user