diff --git a/layouts/_default/single.html b/layouts/_default/single.html index aebd38c..7d02963 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -12,6 +12,6 @@ {{ partial "metadata.html" . }}
- {{ .Content }} + {{ partial "content.html" .Content }} {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 05090d9..3e3236b 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,7 +2,7 @@ {{ partial "pagination.html" . }} {{ if eq .Paginator.PageNumber 1 }}

{{ .Title }}

- {{ .Content }} + {{ partial "content.html" .Content }}
{{ end }} {{ range .Paginator.Pages }} @@ -11,7 +11,7 @@

{{ .Title }}

{{ partial "metadata.html" . }} - {{ .Content | truncate 500 }} Read more » + {{ partial "content.html" .Content | truncate 500 }} Read more »
{{ end }} diff --git a/layouts/partials/content.html b/layouts/partials/content.html new file mode 100644 index 0000000..133428f --- /dev/null +++ b/layouts/partials/content.html @@ -0,0 +1 @@ +{{ replaceRE `\[([^\]]*)\]{([^\}]*)}` `$1($2)` . | safeHTML }}