commit 5873447f6ec56e67e36008858448533b48715b96 from: Anton Kasimov date: Mon Mar 23 21:29:57 2026 UTC Исправление генерации atom в соответствии с новым подходом jsonld commit - d71a84298a824064e37aa790ae24e3661952461f commit + 5873447f6ec56e67e36008858448533b48715b96 blob - d68320aeca3b52d1e2559f4cfce57660d483639b blob + 2117c54d49aae9a311c79217e7c297237e110bec --- layouts/atom.atom +++ layouts/atom.atom @@ -6,30 +6,29 @@ {{ .Permalink }} {{- with .OutputFormats.Get "atom" -}} - {{ printf `` .MediaType.Type .Permalink | safeHTML }} + {{ printf `` .MediaType.Type .Permalink | safeHTML }} {{- end }} {{- with or (.GetTerms "authors") .Site.Params.author }} - {{- if ne (printf "%T" .) "string" }}{{.Store.Set "schema" "Person"}}{{ end }} - {{- with partial "schema/load" . }} - - {{ .name }} - {{- with .email }} - {{ . }} + {{- with partial "schema/load" (dict "page" . "schema" "Person") }} + + {{ .name }} + {{- with .email }} + {{ . }} + {{- end }} + {{- end }} - {{- end }} - {{- end }} {{- with .Site.Params }} - {{- if .icon }} - {{ .icon | absURL }} + {{- if .icon }} + {{ .icon | absURL }} + {{- end }} + {{- if .logo }} + {{ .logo | absURL }} + {{- end }} + {{- if .copyright }} + {{ .copyright }} + {{- end }} {{- end }} - {{- if .logo }} - {{ .logo | absURL }} - {{- end }} - {{- if .copyright }} - {{ .copyright }} - {{- end }} - {{- end }} {{/* Добавить ссылку на generator - текущий шаблон */}} {{- $pctx := . -}} {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} @@ -44,35 +43,35 @@ {{- $pages = $pages | first $limit -}} {{- end -}} {{- range $pages }} - {{- $pctx := . }} - {{- if eq .Kind "page" }} - - {{ .Title }} - - {{ .Permalink }} - {{ .PublishDate.Format "2006-01-02T15:04:05Z07:00" | safeHTML }} - {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }} - {{- with .GetTerms "authors" }} - {{- range . }} - {{ .Store.Set "schema" "Person" }} - {{- with partial "schema/load" . }} - - {{ .name }} - {{- with .email }} - {{ . }} + {{- $pctx := . }} + {{- if eq .Kind "page" }} + + {{ .Title }} + + {{ .Permalink }} + {{ .PublishDate.Format "2006-01-02T15:04:05Z07:00" | safeHTML }} + {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }} + {{- with .GetTerms "authors" }} + {{- range . }} + {{ .Store.Set "schema" "Person" }} + {{- with partial "schema/load" . }} + + {{ .name }} + {{- with .email }} + {{ . }} + {{- end }} + {{- end }} - {{- end }} {{- end }} + {{ .Summary | plainify | html }} + {{- if .Site.Params.useFullContentInFeed }} + {{ .Content | transform.XHTML | safeHTML }} + {{- end }} + {{- range .Params.tags }} + + {{- end }} + {{- end }} - {{ .Summary | plainify | html }} - {{- if .Site.Params.useFullContentInFeed }} - {{ .Content | transform.XHTML | safeHTML }} - {{- end }} - {{- range .Params.tags }} - - {{- end }} - {{- end }} - {{- end }}