hugo-toha/layouts/_default/baseof.html
Emruz Hossain 3fcdc6c4b5 Make RSS feed path configurable
Fixes #997

Add configuration option for RSS feed path

* Add `rssPath` configuration option in `exampleSite/hugo.yaml` under the `params` section to specify the desired RSS feed path.
* Set the default value of `rssPath` to `/rss.xml`.
* Update `layouts/_default/baseof.html` to include the RSS feed link with the configured `rssPath` value.
* Use the default path `/index.xml` if `rssPath` is not specified.
2025-02-07 02:16:58 +06:00

52 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
<head>
<title>{{ .Page.Title }}</title>
<!------ ADD COMMON HEADERS -------->
{{- partial "header.html" . -}}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
<!------ ADD PAGE SPECIFIC HEADERS ------->
{{ block "header" . }} {{ end }}
<!--================= add analytics if enabled =========================-->
{{- partial "analytics.html" . -}}
{{ with resources.Get "scripts/core/theme-scheme.js" | fingerprint }}
<script integrity="{{.Data.Integrity}}">
{{ .Content | safeJS }}
</script>
{{ end }}
{{ $rssPath := .Site.Params.rssPath | default "/index.xml" }}
<link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" href="{{ $rssPath | relURL }}">
</head>
<body class="type-{{ .Page.Type }} kind-{{ .Page.Kind }}" data-bs-spy="scroll" data-bs-target="#TableOfContents" data-bs-offset="80">
<div class="container-fluid bg-secondary wrapper">
<!----- ADD NAVBAR --------------->
{{ block "navbar" . }} {{ end }}
<!----- ADD SIDEBAR --------------->
{{ block "sidebar" . }} {{ end }}
<!----- ADD PAGE CONTENT --------->
{{ block "content" . }} {{ end }}
<!----- ADD TABLE OF CONTENTS ----------->
{{ block "toc" . }} {{ end }}
</div>
<!------- ADD FOOTER ------------>
{{ $footerTemplate:= site.Params.footer.template | default "footer.html" }}
{{- partial $footerTemplate . -}}
<!------- ADD COMMON SCRIPTS ------->
{{ partial "scripts.html" . }}
<!------- ADD PAGE SPECIFIC SCRIPTS ------>
{{ block "scripts" . }} {{ end }}
<!------ IF WANTED, ADD SUPPORT LINKS -------->
{{- partial "misc/support.html" . -}}
</body>
</html>