{"id":24960987,"url":"https://github.com/nullnull/simple_sitemap_generator","last_synced_at":"2025-10-15T12:55:35.599Z","repository":{"id":56895840,"uuid":"105364695","full_name":"nullnull/simple_sitemap_generator","owner":"nullnull","description":"A gem for rails to generate sitemap.xml by using config/routes.rb","archived":false,"fork":false,"pushed_at":"2018-10-03T13:17:57.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T13:26:47.728Z","etag":null,"topics":["ruby","ruby-gem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nullnull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-30T11:14:24.000Z","updated_at":"2018-10-03T13:17:58.000Z","dependencies_parsed_at":"2022-08-20T17:10:25.166Z","dependency_job_id":null,"html_url":"https://github.com/nullnull/simple_sitemap_generator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nullnull/simple_sitemap_generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullnull%2Fsimple_sitemap_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullnull%2Fsimple_sitemap_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullnull%2Fsimple_sitemap_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullnull%2Fsimple_sitemap_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nullnull","download_url":"https://codeload.github.com/nullnull/simple_sitemap_generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullnull%2Fsimple_sitemap_generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015910,"owners_count":26085778,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ruby","ruby-gem"],"created_at":"2025-02-03T08:45:13.212Z","updated_at":"2025-10-15T12:55:35.547Z","avatar_url":"https://github.com/nullnull.png","language":"Ruby","readme":"# SimpleSitemapGenerator\n\nSimpleSitemapGenerator is a gem for Ruby on Rails to generate sitemap.xml.\n\n## Features\n\n* Generates `sitemap.xml` **dynamically** by using `config/routes.rb`.\n* Enable to respond **without static file** (eg. `public/sitemap.xml`).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'simple_sitemap_generator'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install simple_sitemap_generator\n\n## Usage\nAll you have to do is following.\n\n##### config/routes.rb\n```ruby\nget '/sitemap.xml', action: :sitemap, controller: :sitemap\n```\n\n##### app/controllers/sitemap_controller.rb\n```ruby\nclass SitemapController \u003c BaseController\n  def sitemap\n    send_data(SimpleSitemapGenerator::Sitemap.generate_xml, type: 'text/xml')\n  end\nend\n```\n\n##### config/initializers/sitemap.rb\n```ruby\n# Set the host name for URL creation\nSimpleSitemapGenerator::Sitemap.host = 'https://www.example.com'\n\n# [optional] Set default parameter\nSimpleSitemapGenerator::Sitemap.default_lastmod = Time.current\nSimpleSitemapGenerator::Sitemap.default_priority = 0.5\nSimpleSitemapGenerator::Sitemap.default_changefreq = 'daily'\n\n# [optional] Set additional_paths\n# NOTE: Output includes only static url (eg. '/users'), does not include dynamic url (eg. '/users/123').\n#       You should specify url if you want.\nSimpleSitemapGenerator::Sitemap.additional_paths = [\n  '/users/123',\n  *Article.published.map{ |a| \"/articles/#{a.id}\"},\n]\n\n# [optional] Set inappropriate paths for sitemap.xml by regular expression\nSimpleSitemapGenerator::Sitemap.inappropriate_paths += [\n  /^\\/admin/,\n  /^\\/mypage/,\n]\n\n# [optional] Set parameter to specific path if you want\nSimpleSitemapGenerator::Sitemap.options = {\n  '/': {\n    priority: 1.0,\n    changefreq: 'daily',\n  },\n}\n```\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/nullnull/simple_sitemap_generator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the SimpleSitemapGenerator project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/simple_sitemap_generator/blob/master/CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullnull%2Fsimple_sitemap_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnullnull%2Fsimple_sitemap_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullnull%2Fsimple_sitemap_generator/lists"}