1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

Atom: directly include un-escaped XHTML

This commit is contained in:
Rohan Kumar 2022-05-31 20:35:14 -07:00
parent 6a7ac36f11
commit e453714d42
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
3 changed files with 8 additions and 4 deletions

View file

@ -150,5 +150,5 @@ disableKinds = ["taxonomy", "term"]
# don't minify html but minify other resources, esp the fulltext rss/atom feeds
[minify]
minifyOutput = true
disableXML = false
disableXML = true
disableHTML = true

View file

@ -8,5 +8,5 @@
{{- $href := printf "%s%s%s" $baseURL $parsedDest.Path $fragment | absURL -}}
<a href="{{ $href }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
{{- else -}}
<a href="{{ .Destination }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
<a href="{{ .Destination | htmlEscape }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
{{- end -}}

View file

@ -16,7 +16,7 @@
<id>{{ .Permalink }}</id>
{{ range $pages }}
<entry>
<title type="html"><![CDATA[{{ .Title | safeHTML }}]]></title>
<title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">{{ .Title | safeHTML }}</div></title>
<link href="{{ .Permalink }}" />
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
@ -26,7 +26,11 @@
</author>
<id>{{ .Permalink }}</id>
<rights>CC-BY-SA 4.0 by Rohan Kumar</rights>
<content type="html"><![CDATA[{{ .Content | safeHTML }}]]></content>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
{{ partial "processed-content.html" . | safeHTML }}
</div>
</content>
<object-type xmlns="http://activitystrea.ms/spec/1.0/">
{{- if eq .Section "notes" -}}
note