{"id":44802609,"url":"https://github.com/lelabdev/gositemap","last_synced_at":"2026-02-16T13:35:56.007Z","repository":{"id":305218956,"uuid":"1022290142","full_name":"lelabdev/gositemap","owner":"lelabdev","description":"A blazing-fast, test-driven sitemap.xml generator for static SvelteKit sites. SEO-ready, TOML-configurable, and CI/CD friendly","archived":false,"fork":false,"pushed_at":"2025-07-26T18:52:18.000Z","size":15277,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-26T22:04:45.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lelabdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-18T19:33:03.000Z","updated_at":"2025-07-26T18:52:08.000Z","dependencies_parsed_at":"2025-07-19T00:14:38.776Z","dependency_job_id":"a5dae88e-dd21-4c33-8e21-8b87589347c2","html_url":"https://github.com/lelabdev/gositemap","commit_stats":null,"previous_names":["lelabdev/gositemap"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lelabdev/gositemap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lelabdev%2Fgositemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lelabdev%2Fgositemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lelabdev%2Fgositemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lelabdev%2Fgositemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lelabdev","download_url":"https://codeload.github.com/lelabdev/gositemap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lelabdev%2Fgositemap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29509202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-16T13:35:53.388Z","updated_at":"2026-02-16T13:35:56.002Z","avatar_url":"https://github.com/lelabdev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoSitemap [![GitHub release](https://img.shields.io/github/v/release/lelabdev/gositemap)](https://github.com/lelabdev/gositemap/releases/latest)\n\n**GoSitemap** is a fast and minimal sitemap generator tailored for static **SvelteKit** sites.\nIt’s built with simplicity, performance, and automation in mind — perfect for CI/CD or local use.\n\n---\n\n## 🔥 What It Does\n\n- Scans your SvelteKit `src/routes/` folder for all **static pages**\n- Parses `.md` and `.svx` articles in `src/lib/content/` or any folder you define\n- Builds a clean `sitemap.xml` with `\u003clastmod\u003e` and optional `\u003cchangefreq\u003e`\n- Uses a single config file: `gositemap.toml` (can be auto-generated on first run)\n- Outputs a ready-to-serve `static/sitemap.xml`\n- 100% static, no server needed\n- Built in Go — fast, lightweight, and dependency-free\n\n---\n\n## 🛠 How to Use\n\n1. Put a `gositemap.toml` at your project root\n   (or just run the tool and it’ll ask you interactively)\n\n2. Run GoSitemap:\n\n   ```sh\n   go run .\n   # or build:\n   go build \u0026\u0026 ./gositemap\n\n   ```\n\n3. Your sitemap will be created at:\n\nstatic/sitemap.xml\n\n---\n\n⚙️ CLI Options\n\n`--help`, `-h` Show help and example config, then exit\n`--dry-run` Output sitemap to stdout only\n`--quiet` Suppress logs except errors\n`preserve_existing` (in `gositemap.toml`) Controls how existing sitemap.xml files are handled.\n\n---\n\n## 🔄 Sitemap Overwrite Behavior (`preserve_existing`)\n\nGoSitemap offers flexible control over how it updates your `sitemap.xml` file:\n\n- **Default Behavior (or `preserve_existing = true` in `gositemap.toml`):**\n  If a `sitemap.xml` file already exists, GoSitemap will **add only new entries** to it. Existing entries (and their `\u003clastmod\u003e` dates) will be preserved and *not* updated. This is ideal for incremental updates where you want to maintain historical `\u003clastmod\u003e` values.\n\n- **Explicit Overwrite (`preserve_existing = false` in `gositemap.toml`):**\n  If `preserve_existing` is explicitly set to `false`, GoSitemap will **regenerate the entire `sitemap.xml` file**. All entries, including existing ones, will have their `\u003clastmod\u003e` dates updated based on the current scan. Use this when you want a fresh sitemap reflecting the latest modification times for all content.\n\n\n---\n\n🧠 Example gositemap.toml\n\n```toml\nbase_url = \"https://yoursite.com\"\npreserve_existing = true # Set to false to overwrite all entries and update lastmod dates\n\n[content_types]\nblog = \"src/lib/content\"\nportfolio = \"src/lib/portfolio\"\n\n# You can also use glob patterns to specify content directories.\n# The slug will be the basename of the directory.\n[[glob]]\npaths = [\n  \"src/content/*\"\n]\n\n[changefreq]\nblog = \"weekly\"\nportfolio = \"monthly\"\nabout = \"yearly\"\n\nexclude = [\n\"/admin\",\n\"/secret\"\n]\n```\n\n---\n\n✨ Sample Output\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003curlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://yoursite.com/\u003c/loc\u003e\n    \u003clastmod\u003e2023-07-01\u003c/lastmod\u003e\n  \u003c/url\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://yoursite.com/blog/article1\u003c/loc\u003e\n    \u003clastmod\u003e2023-07-01\u003c/lastmod\u003e\n    \u003cchangefreq\u003eweekly\u003c/changefreq\u003e\n  \u003c/url\u003e\n\u003c/urlset\u003e\n```\n\n---\n\n🧩 How It Works\n\nStatic pages: Finds all `+page.svelte` or `article.md` files in `src/routes/`\n\nArticles: Includes `.md` / `.svx` from `content_types` folders\n\nExclusions: Ignores dynamic/param folders and anything in `exclude`.\n\n  - If an exclusion starts with `/`, it's treated as a full path prefix (e.g., `/admin` excludes `/admin` and `/admin/users`).\n  - Otherwise, it matches any directory segment in the URL (e.g., `(flow)` excludes `/blog/(flow)/post`).\n\nlastmod: Uses `publishDate` (if found) or file mtime\n\nchangefreq: Defaults to never, customizable via [changefreq]\n\nURL Order: Root → top-level pages → articles → subpages\n\n---\n\n## 📥 Installation\n\nDownload the binary for your OS from the [latest release](https://github.com/lelab/GoSitemap/releases/latest),\nthen make it executable (on Linux/macOS):\n\n```sh\nchmod +x gositemap\n./gositemap\n```\n\n---\n\n📦 Downloads\n\nGrab the latest release:\n➡️ [Latest Release](https://github.com/lelabdev/gositemap/releases/latest)\n\nEach binary is compiled with optimizations for minimal size.\nThe version is embedded directly into the binary (-ldflags), no suffix needed.\n\n---\n\n✅ Requirements\n\nGo 1.21 or newer\n\nSvelteKit static site structure (uses /static, /routes, etc.)\n\n---\n\n🤔 Why GoSitemap?\n\nSuper light, no runtime dependencies\n\nNo YAML/JSON mess — config is TOML and explicit\n\nCLI-first: works locally or in your CI\n\nClean, readable sitemap output\n\nWorks out of the box with SvelteKit projects\n\n---\n\n💬 FAQ\n\nHow do I change the \u003cchangefreq\u003e per type?\nUse the [changefreq] section in your TOML.\n\nMy page is missing from the sitemap!\nCheck if it’s dynamic (e.g. [slug]), in parentheses, or listed in exclude.\n\nHow to rename /blog/ to something else?\nJust change the key in [content_types]:\n\narticles = \"src/lib/content\"\n\n→ This gives /articles/my-post.\n\nMy base_url is invalid!\nIt should start with http:// or https://, and no trailing slash.\n\n---\n\n🪪 License\n\nMIT\n\n---\n\nBuilt for real-world static SvelteKit sites.\nScriptable. Predictable. No fluff.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flelabdev%2Fgositemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flelabdev%2Fgositemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flelabdev%2Fgositemap/lists"}