mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-05-02 22:52:44 +00:00
theme(fix): add transform.Plainify to the summary body content of the share links (#758)
You definitely want to **add Plainify transformer first**, because the body content will become a HTML encoding mess. I left `HTMLEscape` there as well, just be sure for security reasons. But if you want, I can remove the second transformer. Like a tweet on X will look like this:  After implementing `transform.Plainify`, it will look much better:  (ignore the red, I don't have X premium pro blabla, it's red because I hit the max limit of chars) Signed-off-by: Melroy van den Berg <melroy@melroy.org>
This commit is contained in:
parent
43176864bc
commit
2cfb09e9a3
@ -66,7 +66,7 @@
|
||||
{{- $setup := .setup -}}
|
||||
{{- $separator := "&" -}}
|
||||
{{- $title := $context.Title | transform.HTMLEscape -}}
|
||||
{{- $description := $context.Summary | transform.HTMLEscape -}}
|
||||
{{- $description := $context.Summary | transform.Plainify | transform.HTMLEscape -}}
|
||||
{{- $permalink := $context.Permalink | transform.HTMLEscape -}}
|
||||
{{- with $setup.separator -}}
|
||||
{{- $separator = . -}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user