Skip to content

Commit d0234c1

Browse files
author
Paul Osinski
committed
create sitemap at root
1 parent b29026c commit d0234c1

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

docs/config/_default/hugo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ copyRight = "Copyright (c) 2020-2024 Thulite"
2222
enable = true
2323

2424
[outputs]
25-
home = ["HTML", "RSS", "searchIndex"]
25+
home = ["HTML", "RSS", "searchIndex", "SITEMAP"]
2626
section = ["HTML", "RSS", "SITEMAP"]
2727

2828
[outputFormats.searchIndex]
@@ -41,7 +41,7 @@ copyRight = "Copyright (c) 2020-2024 Thulite"
4141
rel = "sitemap"
4242

4343
[sitemap]
44-
changefreq = "monthly"
44+
changefreq = "weekly"
4545
filename = "sitemap.xml"
4646
priority = 0.5
4747

docs/content/_index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "DefectDojo Documentation"
3+
date: 2021-02-02T20:46:29+01:00
4+
draft: false
5+
---

docs/layouts/_default/sitemap.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- /* sitemap for all pages */ -}}
2+
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\"?>" | safeHTML }}
3+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
4+
{{ range .Site.RegularPages }}
5+
<url>
6+
<loc>{{ .Permalink }}</loc>
7+
<changefreq>weekly</changefreq>
8+
{{ with .Lastmod }}
9+
<lastmod>{{ .Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastmod>
10+
{{ end }}
11+
</url>
12+
{{ end }}
13+
</urlset>

0 commit comments

Comments
 (0)