mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 03:36:41 +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">
|
<div class="copyright">
|
||||||
{{ $length := len ( split .Site.Params.githubRepo "/" ) }}
|
{{ $length := len ( split .Site.Params.githubRepo "/" ) }}
|
||||||
{{ if eq $length 2 }}
|
{{ 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 }}
|
{{ 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 }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Reference in New Issue
Block a user