Last active
March 22, 2022 11:38
-
-
Save cp-sumi-k/5ba030a5bb2095b6cea1a3eccf2233f3 to your computer and use it in GitHub Desktop.
https://medium.com/canopas/automation-dynamic-sitemap-generation-with-golang-api-584f6c53ea9c - sitemap-3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobsUrl := baseUrl + '/jobs' | |
// Init all static urls for sitemap | |
sitemapUrls := []URL{ | |
{Loc: baseUrl, Priority: `1`}, | |
{Loc: jobsUrl , Priority: `1`}, | |
} | |
// Init all dynamic urls for sitemap | |
jobs, err := GetJobs() | |
for i := range jobs { | |
sitemapUrls = append(sitemapUrls, URL{Loc: jobsUrl + `/` + jobs[i].Id, Priority: `0.9`}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment