This project is a Go application designed to generate sitemaps for websites. It crawls the specified domain, normalizes URLs, and generates a sitemap in XML format. The application also supports adding additional URLs and provides a verbose mode for detailed output.
- Sitemap Generation: Automatically generates sitemaps for websites.
- URL Normalization: Removes trailing slashes and ignores URLs with query parameters to maintain consistency.
- Additional URLs: Allows inclusion of additional URLs in the sitemap.
- Verbose Mode: Provides detailed output for debugging and monitoring.
curl -L -o sitemap-generator \
https://github.com/devzero-inc/sitemap-generator/releases/latest/download/sitemap-generator-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \
chmod +x sitemap-generator
mv sitemap-generator /usr/local/bin/sitemap-generator
# or
sudo mv sitemap-generator /usr/local/bin/sitemap-generator
Go programming language (version 1.22 or later)
- Clone the repository
git clone https://github.com/yourusername/sitemap-generator.git
cd sitemap-generator
- Build the project
go build -o sitemap-generator
- Run the binary:
./sitemap-generator -domain https://example.com
- Command-line options:
-domain
: The base domain of the website for which you want to generate the sitemap.-add-url
: Additional URL to include in the sitemap (can be repeated).-verbose
: Enable verbose mode for detailed output.
To generate a sitemap for https://example.com and include additional URLs, run:
./sitemap-generator -domain https://example.com -add-url /page1 -add-url /page2 -verbose
This project is licensed under the MIT License - see the LICENSE file for details.