mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-14 19:26:40 +02:00
View on Github handles Windows paths
This commit is contained in:

committed by
Michael Noronha

parent
587b2ac961
commit
508953fc7e
@@ -5,9 +5,9 @@
|
||||
<div class="copyright">
|
||||
{{ $length := len ( split .Site.Params.githubRepo "/" ) }}
|
||||
{{ if eq $length 2 }}
|
||||
<a href="https://github.com/{{ .Site.Params.githubRepo }}/tree/master/content/{{ .File.Path }}" target="_blank">View this post on GitHub</a>
|
||||
<a href="https://github.com/{{ .Site.Params.githubRepo }}/tree/master/content/{{ replace .File.Path "\\" "/" }}" target="_blank">View this post on GitHub</a>
|
||||
{{ else }}
|
||||
<a href="https://github.com/{{ .Site.Params.githubRepo }}/content/{{ .File.Path }}" target="_blank">View this post on GitHub</a>
|
||||
<a href="https://github.com/{{ .Site.Params.githubRepo }}/content/{{ replace .File.Path "\\" "/" }}" target="_blank">View this post on GitHub</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user