Skip to content

Commit

Permalink
Remove 404s from sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Scarr committed Aug 23, 2018
1 parent 15d8d4a commit 020bf00
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/content/introduction.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
linkTitle: Introduction
title: Type-safe graphql for golang
description: Generating GraphQL servers in golang with type safety
type: homepage
date: 2018-03-17T13:06:47+11:00
---
Expand Down
13 changes: 13 additions & 0 deletions docs/layouts/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }}
{{ if or .Description (eq .Kind "home") }}
<url>
<loc>{{ .Permalink }}</loc>
{{ if not .Lastmod.IsZero }}<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}
{{ with .Sitemap.ChangeFreq }}<changefreq>{{ . }}</changefreq>{{ end }}
{{ if ge .Sitemap.Priority 0.0 }}<priority>{{ .Sitemap.Priority }}</priority>{{ end }}
</url>
{{ end }}
{{ end }}
</urlset>

0 comments on commit 020bf00

Please sign in to comment.