File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ params:
3636 category_id : " DIC_kwDOSeSzss4DFPF-"
3737
3838buildFuture : true
39+ enableRobotsTXT : true
3940
4041markup :
4142 goldmark :
Original file line number Diff line number Diff line change 1+ {{/*
2+ Same as Hugo's built-in sitemap, except it skips pages that are noindex
3+ (see partials/seo/indexable.html) and drops <lastmod > values in the
4+ future — upcoming events otherwise push list pages' lastmod past today,
5+ which search engines treat as invalid.
6+ */}}
7+ {{ printf "<?xml version =\" 1.0\" encoding =\" utf-8\" standalone =\" yes\" ?>" | safeHTML }}
8+ <urlset xmlns =" http://www.sitemaps.org/schemas/sitemap/0.9" >
9+ {{- range where .Pages "Sitemap.Disable" "ne" true }}
10+ {{- if and .Permalink (partial "seo/indexable.html" .) }}
11+ <url >
12+ <loc >{{ .Permalink }}</loc >
13+ {{- if and (not .Lastmod.IsZero) (le .Lastmod.Unix now.Unix) }}
14+ <lastmod >{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastmod >
15+ {{- end }}
16+ </url >
17+ {{- end }}
18+ {{- end }}
19+ </urlset >
Original file line number Diff line number Diff line change 1414{{ with .Params.author }}< meta name ="author " content ="{{ . }} "> {{ end }}
1515
1616{{/* ── Robots ── */}}
17- < meta name ="robots " content ="index, follow ">
17+ < meta name ="robots " content ="{{ if partial " seo /indexable.html" . }} index{{ else }}noindex{{ end }} , follow">
1818
1919{{/* ── Feed auto-discovery (only present on pages that actually have one, e.g. /blog/) ── */}}
2020{{ range .AlternativeOutputFormats }}
Original file line number Diff line number Diff line change 1+ {{/*
2+ Whether a page should be indexed by search engines. Used by head.html
3+ (meta robots) and the sitemap template so the two never disagree.
4+
5+ Taxonomy overview pages (/pricing/, /levels/, ...) and most facet term
6+ pages (/pricing/free/, /countries/brazil/, ...) are thin filter views of
7+ the same resources, so they are noindex (links on them are still
8+ followed). Subcategory terms with at least 3 resources are kept — those
9+ are real topical landing pages ("Monitoring & Observability", ...).
10+ Any page can override with `robots: noindex` in front matter.
11+ */}}
12+ {{ $indexable := true }}
13+ {{ if eq .Kind "taxonomy" }}
14+ {{ $indexable = false }}
15+ {{ else if eq .Kind "term" }}
16+ {{ $indexable = and (eq .Data.Plural "subcategories") (ge (len .Pages) 3) }}
17+ {{ end }}
18+ {{ with .Params.robots }}{{ if in . "noindex" }}{{ $indexable = false }}{{ end }}{{ end }}
19+ {{ return $indexable }}
Original file line number Diff line number Diff line change 1+ User-agent: *
2+ Allow: /
3+
4+ Sitemap: {{ "sitemap .xml " | absURL }}
You can’t perform that action at this time.
0 commit comments