From aa79da44fbdac0d8b5e7d51019188c30cb09beab Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 20 Dec 2025 23:25:28 +0100 Subject: [PATCH] Removed the generated layout-elements in `layout` --- layouts/partials/comments.html | 66 ---------------------- layouts/rss.xml | 83 ---------------------------- layouts/shortcodes/audio.html | 5 -- layouts/shortcodes/catlist.html | 24 -------- layouts/shortcodes/gallery.html | 5 -- layouts/shortcodes/googlemaps.html | 5 -- layouts/shortcodes/parallaxblur.html | 61 -------------------- 7 files changed, 249 deletions(-) delete mode 100644 layouts/partials/comments.html delete mode 100644 layouts/rss.xml delete mode 100644 layouts/shortcodes/audio.html delete mode 100644 layouts/shortcodes/catlist.html delete mode 100644 layouts/shortcodes/gallery.html delete mode 100644 layouts/shortcodes/googlemaps.html delete mode 100644 layouts/shortcodes/parallaxblur.html diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html deleted file mode 100644 index cca573ff..00000000 --- a/layouts/partials/comments.html +++ /dev/null @@ -1,66 +0,0 @@ - - -{{ $site_comments := .Site.Data.comments }} - - -{{ if not $site_comments }} - {{ return "" }} -{{ end }} - - -{{ with (where .Site.Data.comments "post_id" .Params.post_id ) }} - -{{ end }} - -{{- define "comments" -}} - - {{ $site_comments := .site_comments }} - {{ $query_parent_id := .parent_id }} - - - {{ range .post_comments }} - {{ $author_name := index . "author_name" }} - {{ $author_link := index . "author_url" }} - {{ $date := index . "published" }} - {{ $parent_id := index . "parent_id" }} - {{ $id := index . "id" }} - - - {{ if eq $parent_id $query_parent_id }} -
  • -
    - - - - - {{ with $author_link }} - {{ $author_name }} - {{ else }} - {{ $author_name }} - {{ end }} - - -
    - -
    - {{ index . "content" | markdownify | safeHTML }} -
    - - - {{ with (where $site_comments "parent_id" $id) }} - - {{ end }} - -
  • - {{ end }} - {{ end }} -{{- end -}} diff --git a/layouts/rss.xml b/layouts/rss.xml deleted file mode 100644 index 8d1df277..00000000 --- a/layouts/rss.xml +++ /dev/null @@ -1,83 +0,0 @@ -{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} -{{- $authorEmail := "" }} -{{- with site.Params.author }} - {{- if reflect.IsMap . }} - {{- with .email }} - {{- $authorEmail = . }} - {{- end }} - {{- end }} -{{- else }} - {{- with site.Author.email }} - {{- $authorEmail = . }} - {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} - {{- end }} -{{- end }} - -{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} -{{- $authorName := "" }} -{{- with site.Params.author }} - {{- if reflect.IsMap . }} - {{- with .name }} - {{- $authorName = . }} - {{- end }} - {{- else }} - {{- $authorName = . }} - {{- end }} -{{- else }} - {{- with site.Author.name }} - {{- $authorName = . }} - {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} - {{- end }} -{{- end }} - -{{- $pctx := . }} -{{- if .IsHome }}{{ $pctx = site }}{{ end }} -{{- $pages := slice }} -{{- if or $.IsHome $.IsSection }} -{{- $pages = $pctx.RegularPages }} -{{- else }} -{{- $pages = $pctx.Pages }} -{{- end }} -{{- $limit := site.Config.Services.RSS.Limit }} -{{- if ge $limit 1 }} -{{- $pages = $pages | first $limit }} -{{- end }} -{{- printf "" | safeHTML }} - - - {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }} - {{ .Permalink }} - Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }} - {{- with site.Params.images }} - - {{ site.Title }} - {{ index . 0 | absURL }} - {{ index . 0 | absURL }} - - {{- end }} - Hugo -- {{ hugo.Version }} - {{ site.Language.LanguageCode }}{{ with $authorEmail }} - {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} - {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with site.Copyright }} - {{ . | markdownify | plainify | strings.TrimPrefix "© " }}{{ end }}{{ if not .Date.IsZero }} - {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} - {{- with .OutputFormats.Get "RSS" }} - {{ printf "" .Permalink .MediaType | safeHTML }} - {{- end }} - {{- range $pages }} - {{- if and (ne .Layout `search`) (ne .Layout `archives`) }} - - {{ .Title }} - {{ .Permalink }} - {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} - {{ if .Params.GUID }} {{ .Params.guid }} {{ else }} {{ .Permalink }} {{ end }} - {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} - {{- if and site.Params.ShowFullTextinRSS .Content }} - {{ (printf "" .Content) | safeHTML }} - {{- end }} - - {{- end }} - {{- end }} - - diff --git a/layouts/shortcodes/audio.html b/layouts/shortcodes/audio.html deleted file mode 100644 index 90cd0606..00000000 --- a/layouts/shortcodes/audio.html +++ /dev/null @@ -1,5 +0,0 @@ - - diff --git a/layouts/shortcodes/catlist.html b/layouts/shortcodes/catlist.html deleted file mode 100644 index 90c5da85..00000000 --- a/layouts/shortcodes/catlist.html +++ /dev/null @@ -1,24 +0,0 @@ -{{ $category := .Get "category" }} -{{ $catLink := .Get "catlink" | default true }} -{{ $count := .Get "count" | default 5 }} - -{{ $p := site.AllPages }} -{{ $p = where $p "Params.category" "intersect" (slice $category) }} - -{{ $categoryTitle := title $category }} -{{ $categoryTitle = strings.Replace $categoryTitle "-" " " }} - -

    - {{ if $catLink }} - {{$categoryTitle }} - {{ else }} - {{ $categoryTitle }} - {{ end }} - -

    - diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html deleted file mode 100644 index 69be59ad..00000000 --- a/layouts/shortcodes/gallery.html +++ /dev/null @@ -1,5 +0,0 @@ - -{{ $p := .Page }} - diff --git a/layouts/shortcodes/googlemaps.html b/layouts/shortcodes/googlemaps.html deleted file mode 100644 index c37c434a..00000000 --- a/layouts/shortcodes/googlemaps.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/layouts/shortcodes/parallaxblur.html b/layouts/shortcodes/parallaxblur.html deleted file mode 100644 index 7f1ef90b..00000000 --- a/layouts/shortcodes/parallaxblur.html +++ /dev/null @@ -1,61 +0,0 @@ -{{ $imgURL := .Get "src" }} -{{ $id := substr (md5 .Inner) 0 16 }} - - - -
    - {{ .Inner | markdownify }} -
    -- 2.39.5