Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/yihui/hugo-xmag.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYihui Xie <xie@yihui.name>2018-07-22 21:37:36 +0300
committerYihui Xie <xie@yihui.name>2018-07-22 21:37:36 +0300
commit506aaa7b34fbf1f87b9ed7b0577c60c144fa4c3c (patch)
tree16a9fa4a7dc24a5bed86dd7284368d1fb4747b9e
parent8a680e5395dfc5ccc055c10ed8c2e7cee1063c17 (diff)
fix #6: use / in the file path
-rw-r--r--layouts/partials/header.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 0a79efc..7abbbf9 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -24,6 +24,7 @@
{{ else }}
{{ $.Scratch.Set "FilePath" .File.Path }}
{{ end }}
+ {{ $.Scratch.Set "FilePath" (replace ($.Scratch.Get "FilePath") "\\" "/") }}
{{ with .Site.Params.github_edit}}
<span><a href="{{ . }}{{ $.Scratch.Get "FilePath" }}">{{ (default "Edit this page" $.Site.Params.text.edit) | safeHTML }}</a></span>
{{ end }}