From ac94b0bd78e09735817ae6f359a29780b027d0d8 Mon Sep 17 00:00:00 2001 From: Richard Kettelerij Date: Fri, 27 Sep 2024 11:53:10 +0200 Subject: [PATCH] feat: setup sitemap.xml --- internal/engine/templates/sitemap.go.xml | 75 +++++++++++++++++++++++- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/internal/engine/templates/sitemap.go.xml b/internal/engine/templates/sitemap.go.xml index 82149fde..68155964 100644 --- a/internal/engine/templates/sitemap.go.xml +++ b/internal/engine/templates/sitemap.go.xml @@ -1,7 +1,78 @@ - https: //www.example.com/foo.html - 2022-06-04 + {{ .Config.BaseURL}}/ + + {{ .Config.BaseURL}}/api + + + {{ .Config.BaseURL}}/conformance + + {{ if .Config.HasCollections }} + + {{ .Config.BaseURL}}/collections + + {{ end }} + {{ range $index, $coll := .Config.AllCollections.Unique }} + + {{ $.Config.BaseURL}}/collections/{{ $coll.ID }} + + {{ if and $.Config.OgcAPI.Tiles $.Config.OgcAPI.Tiles.Collections ($.Config.OgcAPI.Tiles.Collections.ContainsID $coll.ID) }} + + {{ $.Config.BaseURL}}/collections/{{ $coll.ID }}/tiles + + {{ end }} + {{ if and $.Config.OgcAPI.Features $.Config.OgcAPI.Features.Collections ($.Config.OgcAPI.Features.Collections.ContainsID $coll.ID) }} + + {{ $.Config.BaseURL}}/collections/{{ $coll.ID }}/items + + {{ end }} + {{/* don't list /collections//3dtiles since it has no HTML representation */}} + {{ end }} + {{ if and .Config.OgcAPI.Tiles .Config.OgcAPI.Tiles.DatasetTiles }} + + {{ .Config.BaseURL}}/tiles + + {{ if .Config.OgcAPI.Tiles.HasProjection "EPSG:28992" }} + + {{ .Config.BaseURL}}/tiles/NetherlandsRDNewQuad + + {{ end }} + {{ if .Config.OgcAPI.Tiles.HasProjection "EPSG:3035" }} + + {{ .Config.BaseURL}}/tiles/EuropeanETRS89_LAEAQuad + + {{ end }} + {{ if .Config.OgcAPI.Tiles.HasProjection "EPSG:3857" }} + + {{ .Config.BaseURL}}/tiles/WebMercatorQuad + + {{ end }} + {{ end }} + {{ if .Config.OgcAPI.Tiles }} + + {{ .Config.BaseURL}}/tileMatrixSets + + {{ if .Config.OgcAPI.Tiles.HasProjection "EPSG:28992" }} + + {{ .Config.BaseURL}}/tileMatrixSets/NetherlandsRDNewQuad + + {{ end }} + {{ if .Config.OgcAPI.Tiles.HasProjection "EPSG:3035" }} + + {{ .Config.BaseURL}}/tileMatrixSets/EuropeanETRS89_LAEAQuad + + {{ end }} + {{ if .Config.OgcAPI.Tiles.HasProjection "EPSG:3857" }} + + {{ .Config.BaseURL}}/tileMatrixSets/WebMercatorQuad + + {{ end }} + {{ end }} + {{ if and .Config.OgcAPI.Styles .Config.OgcAPI.Tiles }} + + {{ .Config.BaseURL}}/styles + + {{ end }} \ No newline at end of file