also consider .Rmarkdown source files
This commit is contained in:
@@ -5,15 +5,20 @@
|
|||||||
{{ . | markdownify }}
|
{{ . | markdownify }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .File.Path }}
|
{{ if .File.Path }}
|
||||||
{{ $RmdFile := (print .File.BaseFileName ".Rmd") }}
|
|
||||||
{{ if (where (readDir (print "content/" .File.Dir)) "Name" $RmdFile) }}
|
|
||||||
{{ $.Scratch.Set "FilePath" (print .File.Dir $RmdFile) }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $.Scratch.Set "FilePath" .File.Path }}
|
{{ $.Scratch.Set "FilePath" .File.Path }}
|
||||||
{{ end }}
|
{{ $RmdFile := (print .File.BaseFileName ".Rmd") }}
|
||||||
{{ with .Site.Params.GithubEdit}}
|
{{ $Files := readDir (print "content/" .File.Dir) }}
|
||||||
| <a href="{{ . }}{{ $.Scratch.Get "FilePath" }}">Edit this page</a>
|
{{ if (where $Files "Name" $RmdFile) }}
|
||||||
{{ end }}
|
{{ $.Scratch.Set "FilePath" (print .File.Dir $RmdFile) }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $RmdFile := (print .File.BaseFileName ".Rmarkdown") }}
|
||||||
|
{{ if (where $Files "Name" $RmdFile) }}
|
||||||
|
{{ $.Scratch.Set "FilePath" (print .File.Dir $RmdFile) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.GithubEdit}}
|
||||||
|
| <a href="{{ . }}{{ $.Scratch.Get "FilePath" }}">Edit this page</a>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user