https://github.com/cattlecloud/sitemaps
Go library for generating correct sitemap.xml files
https://github.com/cattlecloud/sitemaps
go golang library sitemap sitemap-builder sitemap-generator
Last synced: about 1 month ago
JSON representation
Go library for generating correct sitemap.xml files
- Host: GitHub
- URL: https://github.com/cattlecloud/sitemaps
- Owner: cattlecloud
- License: bsd-3-clause
- Created: 2025-11-01T11:32:17.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-12-05T23:21:27.000Z (4 months ago)
- Last Synced: 2025-12-09T13:24:49.446Z (4 months ago)
- Topics: go, golang, library, sitemap, sitemap-builder, sitemap-generator
- Language: Go
- Homepage: https://cattlecloud.net/go/sitemaps
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sitemaps
[](https://pkg.go.dev/cattlecloud.net/go/sitemaps)
[](https://github.com/cattlecloud/sitemaps/blob/main/LICENSE)
[](https://github.com/cattlecloud/sitemaps/actions/workflows/ci.yaml)
`sitemaps` is a Go library for generating sitemap.xml files
### Getting Started
The `sitemaps` package can be added to a Go project with `go get`.
```shell
go get cattlecloud.net/go/sitemaps@latest
```
### Examples
```go
sitemap := make(sitemaps.Site, 0, 1)
sitemap = append(sitemap, &sitemaps.URL{
Location: "/",
Modified: sitemaps.DayFrom(time.Now()),
Frequency: sitemaps.Weekly,
Priority: sitemaps.Low,
})
// w is io.Writer (e.g. http.ResponseWriter)
_ = sitemap.Write(w)
```
### License
The `cattlecloud.net/go/sitemaps` module is open source under the [BSD-3-Clause](LICENSE) license.