Use partial to clean content
This commit is contained in:
parent
a2c57f3c6a
commit
4bed2db371
|
@ -12,7 +12,7 @@
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
"type": "Note",
|
"type": "Note",
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
"content": {{ ((htmlUnescape .Content | safeHTML) | replaceRE "href=\"/([^\"]*)\"" ( printf "href=\"%s$1\"" ( "" | absURL ) ) ) | jsonify }},
|
"content": {{ partial "cleanedContent.json" . }},
|
||||||
{{- if .Params.images }}
|
{{- if .Params.images }}
|
||||||
"attachment": [
|
"attachment": [
|
||||||
{{ $delimiter := "" -}}
|
{{ $delimiter := "" -}}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
{{ (( htmlUnescape .Content | safeHTML ) | replaceRE "href=\"/([^\"]*)\"" ( printf "href=\"%s$1\"" ( "" | absURL ) ) ) | jsonify }}
|
Reference in New Issue