{"id":27599654,"url":"https://github.com/hashobject/sitemap","last_synced_at":"2025-06-15T15:35:25.199Z","repository":{"id":8734377,"uuid":"10409297","full_name":"hashobject/sitemap","owner":"hashobject","description":"Clojure library for sitemap generation.","archived":false,"fork":false,"pushed_at":"2019-02-25T01:48:25.000Z","size":43,"stargazers_count":16,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-22T16:07:30.605Z","etag":null,"topics":["clojure","clojure-library","sitemap-generator"],"latest_commit_sha":null,"homepage":"http://os.hashobject.com/sitemap/","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hashobject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-31T17:02:32.000Z","updated_at":"2022-07-20T22:36:02.000Z","dependencies_parsed_at":"2022-09-17T16:50:48.948Z","dependency_job_id":null,"html_url":"https://github.com/hashobject/sitemap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hashobject/sitemap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashobject%2Fsitemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashobject%2Fsitemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashobject%2Fsitemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashobject%2Fsitemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashobject","download_url":"https://codeload.github.com/hashobject/sitemap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashobject%2Fsitemap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259998129,"owners_count":22943757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["clojure","clojure-library","sitemap-generator"],"created_at":"2025-04-22T15:40:32.649Z","updated_at":"2025-06-15T15:35:25.144Z","avatar_url":"https://github.com/hashobject.png","language":"Clojure","readme":"# sitemap\n\nClojure library for generating sitemaps.\n\n[![Build Status](https://travis-ci.org/hashobject/sitemap.svg)](https://travis-ci.org/hashobject/sitemap)\n[![Dependencies Status](https://jarkeeper.com/hashobject/sitemap/status.svg)](https://jarkeeper.com/hashobject/sitemap)\n[![Downloads](https://jarkeeper.com/hashobject/sitemap/downloads.svg)](https://jarkeeper.com/hashobject/sitemap)\n\nSitemaps XML format described on [http://www.sitemaps.org/](http://www.sitemaps.org/protocol.html).\n\nSitemap library accepts Clojure list/vectore data sctructure and produces sitemap XML as string.\n\nOptionally sitemap XML can be saved to file using provided path.\n\nInput data structure should be in the following format:\n\n```clojure\n[\n  {:loc \"http://hashobject.com/about\"\n   :lastmod \"2013-05-31\"\n   :changefreq \"monthly\"\n   :priority \"0.8\"}\n  {:loc \"http://hashobject.com/team\"\n   :lastmod \"2013-06-01\"\n   :changefreq \"monthly\"\n   :priority \"0.9\"}]\n```\n\nSo it should be sequence of hash maps. Each map should have following keys:\n\n  * loc - url to the page\n  * lastmod - date when page was modified in YYYY-MM-DD format\n  * changefreq - how often page content will be changed (daily, weekly, monthly, never)\n  * priority - what is the priority of this page on the site (from 0 to 1)\n\n\nNote that only 'loc' key is mandatory.\n\nPlease refer to documentation for values' formats of each key.\n\n\n## Install\n\n```\n[sitemap \"0.4.0\"]\n```\n\n## Usage\n\n```clojure\nuser=\u003e (use 'sitemap.core)\nnil\nuser=\u003e (generate-sitemap [{:loc \"http://hashobject.com/about\"\n                         :lastmod \"2013-05-31\"\n                         :changefreq \"monthly\"\n                         :priority \"0.8\"}\n                        {:loc \"http://hashobject.com/team\"\n                         :lastmod \"2013-06-01\"\n                         :changefreq \"monthly\"\n                         :priority \"0.9\"}])\n```\n\ngenerates the following XML:\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\u003ehttp://hashobject.com/about\u003c/loc\u003e\n    \u003clastmod\u003e2013-05-31\u003c/lastmod\u003e\n    \u003cchangefreq\u003emonthly\u003c/changefreq\u003e\n    \u003cpriority\u003e0.8\u003c/priority\u003e\n  \u003c/url\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttp://hashobject.com/team\u003c/loc\u003e\n    \u003clastmod\u003e2013-06-01\u003c/lastmod\u003e\n    \u003cchangefreq\u003emonthly\u003c/changefreq\u003e\n    \u003cpriority\u003e0.9\u003c/priority\u003e\n  \u003c/url\u003e\n\u003c/urlset\u003e\n```\n\n## Tips\n\nWe recommend you to validate your sitemap before submitting it to Google Webmaster tools.\nYou can use this library and there are also plenty of online validators.\n\n## Validation\n\nThis library can validate the generated XML against [version 0.9](http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd) of the schema.\n\n```clojure\n(use 'sitemap.core)\n(import 'java.io.File)\n(-\u003e\u003e\n  (generate-sitemap [{:loc \"http://example.com/about\"\n                      :lastmod \"2014-07-23\"\n                      :changefreq \"monthly\"\n                      :priority \"0.5\"}])\n  (save-sitemap (File. \"/tmp/sitemap.xml\"))\n  (validate-sitemap)\n  (count)\n  (format \"You have %d errors\"))\n; \"You have 0 errors\"\n```\n\nValidation errors are reported as a list of [SAXParseException](http://docs.oracle.com/javase/7/docs/api/org/xml/sax/SAXParseException.html):\n\n```clojure\n(-\u003e\u003e\n  (generate-sitemap [{:loc \"http://example.com/about\"\n                      :lastmod \"2000-00-00\"\n                      :changefreq \"monthly\"\n                      :priority \"0.8\"}])\n  (save-sitemap (File. \"/tmp/sitemap-bad.xml\"))\n  (validate-sitemap)\n  (map #(.getMessage %)))\n;(\"cvc-datatype-valid.1.2.3: '2000-00-00' is not a valid value of union type 'lastmod'.\"\n; \"cvc-type.3.1.3: The value '2000-00-00' of element 'lastmod' is not valid.\")\n```\n\n## Contributions\n\nWe love contributions. Please submit your pull requests.\n\n\n## License\n\nCopyright © 2013-2019 Hashobject Ltd (team@hashobject.com).\n\nDistributed under the [Eclipse Public License](http://opensource.org/licenses/eclipse-1.0).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashobject%2Fsitemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashobject%2Fsitemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashobject%2Fsitemap/lists"}