Increase Default Max Depth
This commit is contained in:
@@ -97,7 +97,7 @@ func (h *Handler) GenerateSitemapXML(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// Set default max depth
|
||||
if req.MaxDepth <= 0 || req.MaxDepth > 5 {
|
||||
req.MaxDepth = 3
|
||||
req.MaxDepth = 5
|
||||
}
|
||||
|
||||
// Generate UUID server-side
|
||||
@@ -446,7 +446,7 @@ func generateXMLSitemap(pages []*models.Page) string {
|
||||
sb.WriteString(fmt.Sprintf(" <loc>%s</loc>\n", xmlEscape(page.URL)))
|
||||
sb.WriteString(fmt.Sprintf(" <lastmod>%s</lastmod>\n", page.LastModified.Format("2006-01-02")))
|
||||
sb.WriteString(fmt.Sprintf(" <changefreq>%s</changefreq>\n", page.ChangeFreq))
|
||||
sb.WriteString(fmt.Sprintf(" <priority>%.1f</priority>\n", page.Priority))
|
||||
sb.WriteString(fmt.Sprintf(" <priority>%.2f</priority>\n", page.Priority))
|
||||
sb.WriteString(" </url>\n")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user