mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
5322a15ceb
Add `{{/* ... */}}` header comments to 25 partials that had no documentation,
enabling `pnpm gen:docs` to generate their reference docs. Also fix
base/head/index.html leading blank line that prevented parser matching.
Groups covered: base/, feed/, function/, home/, init/, plugin/, single/, store/, (root).
30 lines
1.0 KiB
HTML
30 lines
1.0 KiB
HTML
{{- /*
|
|
Process content for XML output (used in RSS feeds).
|
|
|
|
Applies content transformations (ruby, fraction, Font Awesome) and prepends
|
|
the featured image, then XML-escapes the result.
|
|
|
|
@param {String} .Content - The raw HTML content
|
|
@param {Boolean} [.Ruby] - Whether to process ruby annotations
|
|
@param {Boolean} [.Fraction] - Whether to process fraction syntax
|
|
@param {Boolean} [.Fontawesome] - Whether to process Font Awesome shortcodes
|
|
@param {String} [.FeaturedImage] - Featured image URL to prepend
|
|
@return {String} The XML-escaped processed content
|
|
*/ -}}
|
|
|
|
{{- $content := .Content -}}
|
|
|
|
{{- if $content -}}
|
|
|
|
{{- $content = dict "Content" .Content "Ruby" .Ruby "Fraction" .Fraction "Fontawesome" .Fontawesome | partial "function/content.html" }}
|
|
|
|
{{- with .FeaturedImage }}
|
|
{{- $content = add (printf "<img src=%q alt=%q referrerpolicy=%q>" . "featured image" "no-referrer") $content }}
|
|
{{- end }}
|
|
|
|
{{- $content = $content | transform.XMLEscape | safeHTML -}}
|
|
|
|
{{- end }}
|
|
|
|
{{- return $content -}}
|