diff options
| author | Cem Keylan <cem@ckyln.com> | 2026-07-23 13:36:43 +0300 |
|---|---|---|
| committer | Cem Keylan <cem@ckyln.com> | 2026-07-23 13:39:20 +0300 |
| commit | 55831e2424332db9071b28924c658a57d26aea29 (patch) | |
| tree | 51e1ec7765c769e2452d1ab76fc7e7bf557cfe52 | |
| parent | fd2bd6f4e721cef0a18c80ba1219eb054f64c832 (diff) | |
| download | website-55831e2424332db9071b28924c658a57d26aea29.tar.gz | |
Update layouts according to template changes in 0.146.0
| -rw-r--r-- | config.toml | 2 | ||||
| -rw-r--r-- | layouts/_default/rss.xml | 39 | ||||
| -rw-r--r-- | layouts/_partials/footer.html (renamed from layouts/partials/footer.html) | 0 | ||||
| -rw-r--r-- | layouts/_partials/head.html (renamed from layouts/partials/head.html) | 0 | ||||
| -rw-r--r-- | layouts/_partials/navbar.html (renamed from layouts/partials/navbar.html) | 0 | ||||
| -rw-r--r-- | layouts/_shortcodes/pkg.html (renamed from layouts/shortcodes/pkg.html) | 0 | ||||
| -rw-r--r-- | layouts/_shortcodes/pkg.txt (renamed from layouts/shortcodes/pkg.txt) | 0 | ||||
| -rw-r--r-- | layouts/baseof.html (renamed from layouts/_default/baseof.html) | 0 | ||||
| -rw-r--r-- | layouts/baseof.txt (renamed from layouts/_default/baseof.txt) | 0 | ||||
| -rw-r--r-- | layouts/blog/list.rss.xml | 100 | ||||
| -rw-r--r-- | layouts/home.html (renamed from layouts/page/index.html) | 0 | ||||
| -rw-r--r-- | layouts/home.txt (renamed from layouts/page/index.txt) | 0 | ||||
| -rw-r--r-- | layouts/rss.xml | 67 | ||||
| -rw-r--r-- | layouts/single.html (renamed from layouts/_default/single.html) | 0 | ||||
| -rw-r--r-- | layouts/single.txt (renamed from layouts/_default/single.txt) | 0 |
15 files changed, 132 insertions, 76 deletions
diff --git a/config.toml b/config.toml index b32188a..fc8b5c4 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,5 @@ baseURL = "https://carbslinux.org" -languageCode = "en-us" +locale = "en-US" title = "Carbs Linux" disableKinds = ["taxonomy", "term"] pygmentsUseClasses = true diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml deleted file mode 100644 index e49c966..0000000 --- a/layouts/_default/rss.xml +++ /dev/null @@ -1,39 +0,0 @@ -{{- $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 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} -<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> - <channel> - <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> - <link>{{ .Permalink }}</link> - <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> - <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} - <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} - <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} - <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} - <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} - <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} - {{- with .OutputFormats.Get "RSS" -}} - {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} - {{- end -}} - {{ range $pages }} - <item> - <title>{{ .Title }}</title> - <link>{{ .Permalink }}</link> - <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> - {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} - <guid>{{ .Permalink }}</guid> - <description>{{ .Content | html }}</description> - </item> - {{ end }} - </channel> -</rss> diff --git a/layouts/partials/footer.html b/layouts/_partials/footer.html index e80288f..e80288f 100644 --- a/layouts/partials/footer.html +++ b/layouts/_partials/footer.html diff --git a/layouts/partials/head.html b/layouts/_partials/head.html index 7a5d194..7a5d194 100644 --- a/layouts/partials/head.html +++ b/layouts/_partials/head.html diff --git a/layouts/partials/navbar.html b/layouts/_partials/navbar.html index 5c29a25..5c29a25 100644 --- a/layouts/partials/navbar.html +++ b/layouts/_partials/navbar.html diff --git a/layouts/shortcodes/pkg.html b/layouts/_shortcodes/pkg.html index 0c2eeff..0c2eeff 100644 --- a/layouts/shortcodes/pkg.html +++ b/layouts/_shortcodes/pkg.html diff --git a/layouts/shortcodes/pkg.txt b/layouts/_shortcodes/pkg.txt index 148dca4..148dca4 100644 --- a/layouts/shortcodes/pkg.txt +++ b/layouts/_shortcodes/pkg.txt diff --git a/layouts/_default/baseof.html b/layouts/baseof.html index a4f747b..a4f747b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/baseof.html diff --git a/layouts/_default/baseof.txt b/layouts/baseof.txt index 49d010f..49d010f 100644 --- a/layouts/_default/baseof.txt +++ b/layouts/baseof.txt diff --git a/layouts/blog/list.rss.xml b/layouts/blog/list.rss.xml index fe84c3f..95d56ad 100644 --- a/layouts/blog/list.rss.xml +++ b/layouts/blog/list.rss.xml @@ -1,39 +1,67 @@ -{{- $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 -}} +{{- $authorEmail := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .email }} + {{- $authorEmail = . }} + {{- end }} + {{- end }} +{{- end }} + +{{- $authorName := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $authorName = . }} + {{- end }} + {{- else }} + {{- $authorName = . }} + {{- 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 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> - <channel> - <title>Carbs Linux Blog</title> - <link>{{ .Permalink }}</link> - <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> - <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} - <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} - <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} - <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} - <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} - <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} - {{- with .OutputFormats.Get "RSS" -}} - {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} - {{- end -}} - {{ range $pages }} - <item> - <title>{{ .Title }}</title> - <link>{{ .Permalink }}</link> - <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> - {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} - <guid>{{ .Permalink }}</guid> - <description>{{ .Content | html }}</description> - </item> - {{ end }} - </channel> + <channel> + <title>Carbs Linux Blog</title> + <link>{{ .Permalink }}</link> + <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description> + <generator>Hugo</generator> + <language>{{ site.Language.Locale }}</language> + {{ with $authorEmail }} + <managingEditor>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor> + {{ end }} + {{ with $authorEmail }} + <webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster> + {{ end }} + {{ with .Site.Copyright }} + <copyright>{{ . }}</copyright> + {{ end }} + {{ if not .Date.IsZero }} + <lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate> + {{ end }} + {{- with .OutputFormats.Get "RSS" }} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} + {{- end }} + {{- range $pages }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }} + <guid>{{ .Permalink }}</guid> + <description>{{ .Summary | transform.XMLEscape | safeHTML }}</description> + </item> + {{- end }} + </channel> </rss> diff --git a/layouts/page/index.html b/layouts/home.html index ec8a704..ec8a704 100644 --- a/layouts/page/index.html +++ b/layouts/home.html diff --git a/layouts/page/index.txt b/layouts/home.txt index d2cdac2..d2cdac2 100644 --- a/layouts/page/index.txt +++ b/layouts/home.txt diff --git a/layouts/rss.xml b/layouts/rss.xml new file mode 100644 index 0000000..2314f42 --- /dev/null +++ b/layouts/rss.xml @@ -0,0 +1,67 @@ +{{- $authorEmail := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .email }} + {{- $authorEmail = . }} + {{- end }} + {{- end }} +{{- end }} + +{{- $authorName := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $authorName = . }} + {{- end }} + {{- else }} + {{- $authorName = . }} + {{- 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 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title> + <link>{{ .Permalink }}</link> + <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description> + <generator>Hugo</generator> + <language>{{ site.Language.Locale }}</language> + {{ with $authorEmail }} + <managingEditor>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor> + {{ end }} + {{ with $authorEmail }} + <webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster> + {{ end }} + {{ with .Site.Copyright }} + <copyright>{{ . }}</copyright> + {{ end }} + {{ if not .Date.IsZero }} + <lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate> + {{ end }} + {{- with .OutputFormats.Get "RSS" }} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} + {{- end }} + {{- range $pages }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }} + <guid>{{ .Permalink }}</guid> + <description>{{ .Summary | transform.XMLEscape | safeHTML }}</description> + </item> + {{- end }} + </channel> +</rss> diff --git a/layouts/_default/single.html b/layouts/single.html index bfa8dcd..bfa8dcd 100644 --- a/layouts/_default/single.html +++ b/layouts/single.html diff --git a/layouts/_default/single.txt b/layouts/single.txt index bfa8dcd..bfa8dcd 100644 --- a/layouts/_default/single.txt +++ b/layouts/single.txt |
