mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
theme: generalize indention #683
This commit is contained in:
parent
c19cef1976
commit
06ab152752
2 changed files with 4 additions and 1 deletions
3
layouts/partials/indent.html
Normal file
3
layouts/partials/indent.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{{- $content := .content }}
|
||||||
|
{{- $indention := .indention }}
|
||||||
|
{{- replaceRE "(\\r\\n|\\r|\\n)" (printf "$1%s" $indention) (replaceRE "^" $indention (trim $content " \n\r")) | safeHTML }}
|
|
@ -17,4 +17,4 @@
|
||||||
{{- with .Site.Params.author }}
|
{{- with .Site.Params.author }}
|
||||||
<meta name="author" content="{{ . }}">
|
<meta name="author" content="{{ . }}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ replace (trim (partial "social.html" .) " \n\r") "<meta " " <meta "| safeHTML }}
|
{{ partial "indent.html" (dict "content" (partial "social.html" .) "indention" " ") }}
|
Loading…
Reference in a new issue