Compare commits

...

3 Commits

Author SHA1 Message Date
vindex10 240690a103
Merge bdaf17bc7c into 33e48f9892 2024-05-02 20:25:33 +02:00
Aditya Telange 33e48f9892
Add anchor link to archive layout headers 2024-05-01 13:56:39 +05:30
Victor Ananyev bdaf17bc7c add cover image to rss 2024-02-08 22:34:46 +01:00
2 changed files with 23 additions and 5 deletions

View File

@ -36,12 +36,21 @@
{{- range $pages.GroupByPublishDate "2006" }}
{{- if ne .Key "0001" }}
<div class="archive-year">
<h2 class="archive-year-header">
{{- replace .Key "0001" "" }}<sup class="archive-count">&nbsp;&nbsp;{{ len .Pages }}</sup>
{{- $year := replace .Key "0001" "" }}
<h2 class="archive-year-header" id="{{ $year }}">
<a class="archive-header-link" href="#{{ $year }}">
{{- $year -}}
</a>
<sup class="archive-count">&nbsp;{{ len .Pages }}</sup>
</h2>
{{- range .Pages.GroupByDate "January" }}
<div class="archive-month">
<h3 class="archive-month-header">{{- .Key }}<sup class="archive-count">&nbsp;&nbsp;{{ len .Pages }}</sup></h3>
<h3 class="archive-month-header" id="{{ $year }}-{{ .Key }}">
<a class="archive-header-link" href="#{{ $year }}-{{ .Key }}">
{{- .Key -}}
</a>
<sup class="archive-count">&nbsp;{{ len .Pages }}</sup>
</h3>
<div class="archive-posts">
{{- range .Pages }}
{{- if eq .Kind "page" }}

View File

@ -73,8 +73,17 @@
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
{{- if and site.Params.ShowFullTextinRSS .Content }}
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
{{- $isCoverHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }}
{{- $cover := (partial "cover.html" (dict "cxt" . "IsSingle" false "IsHome" false "isHidden" $isCoverHidden)) -}}
{{- if (or $cover (and site.Params.ShowFullTextinRSS .Content)) -}}
<content:encoded>
{{- if $cover -}}
{{ (printf "<![CDATA[%s]]>" $cover) | safeHTML }}
{{- end -}}
{{- if and site.Params.ShowFullTextinRSS .Content }}
{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}
{{- end -}}
</content:encoded>
{{- end }}
</item>
{{- end }}