File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
themes/hugo-xmin/layouts/partials Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -38,4 +38,5 @@ footnotereturnlinkcontents = "↩"
3838
3939[params ]
4040 description = " Credibly Curious"
41+ GithubEdit = " https://github.com/rbind/njtierney.com/edit/feature/github-edit/exampleSite/content/"
4142 footer = " © [Nicholas Tierney](https://njtierney.com) 2017 | [Github](https://github.com/njtierney) | [Twitter](https://twitter.com/nj_tierney)"
Original file line number Diff line number Diff line change 44 < hr />
55 {{ . | markdownify }}
66 {{ end }}
7+ {{ if .File.Path }}
8+ {{ $RmdFile := (print .File.BaseFileName ".Rmd") }}
9+ {{ if (where (readDir (print "content/" .File.Dir)) "Name" $RmdFile) }}
10+ {{ $.Scratch.Set "FilePath" (print .File.Dir $RmdFile) }}
11+ {{ else }}
12+ {{ $.Scratch.Set "FilePath" .File.Path }}
13+ {{ end }}
14+ {{ with .Site.Params.GithubEdit}}
15+ | < a href ="{{ . }}{{ $.Scratch.Get "FilePath " }}"> Edit this page</ a >
16+ {{ end }}
17+ {{ end }}
718 </ footer >
819 </ body>
920</ html>
You can’t perform that action at this time.
0 commit comments