feat: Google News sitemap

- sitemap-news.xml lists the articles (content kind article) first
  published in the last two days, newest first, at most 1000, with the
  publication name (news_publication, else app.name), the language of the
  locale, the publication date and the title
- news_sources narrows it to type:<key> and category:<key>:<id> values;
  the Images and News tab lists the values to use in a partial
- the index lists the file while news_enabled is on; otherwise it is 404
This commit is contained in:
Jakub Zych
2026-11-04 12:22:40 +01:00
parent 5bf56fde57
commit a10ce2d9de
9 changed files with 604 additions and 5 deletions

View File

@@ -0,0 +1,19 @@
{{- if .Data.Rows -}}
<section>
<h4>{{ trans "golem15.sitemap::lang.news.sources" }}</h4>
<div class="summer-table-wrap">
<table class="summer-table">
<thead><tr><th>{{ trans "golem15.sitemap::lang.news.source_value" }}</th><th>{{ trans "golem15.sitemap::lang.news.source_label" }}</th></tr></thead>
<tbody>
{{- range .Data.Rows -}}
<tr><td><code>{{ .Value }}</code></td><td>{{ .Label }}</td></tr>
{{- end -}}
</tbody>
</table>
</div>
</section>
{{- else -}}
<div class="summer-callout" role="status">
<p class="summer-callout__text">{{ trans "golem15.sitemap::lang.news.none" }}</p>
</div>
{{- end -}}