relpermalink is now calculated from relpath in editor..

master
Marcell Mars 3 years ago
parent 20deee8968
commit 750ca99aff

@ -101,5 +101,5 @@
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords</span><a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- else -}},&nbsp;<a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\" }" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink | resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }}
{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\" }" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink | resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }}
{{ $dummy := $var.Permalink }}

Loading…
Cancel
Save