{"id":19335711,"url":"https://github.com/buttercms/buttercms-rails","last_synced_at":"2025-10-09T03:33:04.173Z","repository":{"id":52899291,"uuid":"51777713","full_name":"ButterCMS/buttercms-rails","owner":"ButterCMS","description":"Ruby gem to quickly integrate ButterCMS into a current Rails project","archived":false,"fork":false,"pushed_at":"2024-04-11T16:43:30.000Z","size":24,"stargazers_count":42,"open_issues_count":0,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-09T03:32:28.100Z","etag":null,"topics":["cms","rails","ruby"],"latest_commit_sha":null,"homepage":"https://buttercms.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ButterCMS.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-02-15T18:54:13.000Z","updated_at":"2025-09-05T23:39:12.000Z","dependencies_parsed_at":"2025-10-09T03:31:59.256Z","dependency_job_id":null,"html_url":"https://github.com/ButterCMS/buttercms-rails","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ButterCMS/buttercms-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterCMS%2Fbuttercms-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterCMS%2Fbuttercms-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterCMS%2Fbuttercms-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterCMS%2Fbuttercms-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ButterCMS","download_url":"https://codeload.github.com/ButterCMS/buttercms-rails/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterCMS%2Fbuttercms-rails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000714,"owners_count":26082911,"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-09T02:00:07.460Z","response_time":59,"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":["cms","rails","ruby"],"created_at":"2024-11-10T03:08:33.530Z","updated_at":"2025-10-09T03:33:04.158Z","avatar_url":"https://github.com/ButterCMS.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ButterCMS Rails Blog Generator \n\nThis repo provides a generator that expedites setup of your ButterCMS blog into a currently existing Rails project.\nThis repo is no longer being currently maintained; however, if you'd like to try out ButterCMS and Rails \nwith our new [Rails Starter Project](https://buttercms.com/starters/rails-starter-project/), you can\nbe up and running with a Rails + ButterCMS project within two minutes--including a hosted deployment\nto Heroku!\n\n## Documentation\n\nFor a comprehensive list of examples and API docs, check out our [documentation](https://buttercms.com/docs/).\n\n### Installation\n\nTo get started, first install the gem by adding it to your Gemfile:\n\n```\ngem 'buttercms-rails'\n```\n\nAfter installing, run the genereator provided by the gem:\n\n```\nrails generate butter:install_blog\n```\n\nThe generator creates an initializer file and default controllers and views:\n\n```\n|-- app\n    |-- controllers\n        |-- buttercms\n            |-- authors_controller.rb\n            |-- base_controller.rb\n            |-- categories_controller.rb\n            |-- feeds_controller.rb\n            |-- posts_controller.rb\n    |-- views\n        |-- buttercms\n            |-- authors\n                |-- show.html.erb\n            |-- categories\n                |-- show.html.erb\n            |-- posts\n                |-- _post.html.erb\n                |-- index.html.erb\n                |-- show.html.erb\n        |-- layouts\n            |-- buttercms\n                |-- default.html.erb\n\n|-- config\n    |-- initializers\n        |-- buttercms.rb\n```\n\nIt also adds routes to your `routes.rb`  file:\n\n```ruby\n  scope :module =\u003e 'buttercms' do\n    get '/categories/:slug' =\u003e 'categories#show', :as =\u003e :buttercms_category\n    get '/author/:slug' =\u003e 'authors#show', :as =\u003e :buttercms_author\n\n    get '/blog/rss' =\u003e 'feeds#rss', :format =\u003e 'rss', :as =\u003e :buttercms_blog_rss\n    get '/blog/atom' =\u003e 'feeds#atom', :format =\u003e 'atom', :as =\u003e :buttercms_blog_atom\n    get '/blog/sitemap.xml' =\u003e 'feeds#sitemap', :format =\u003e 'xml', :as =\u003e :buttercms_blog_sitemap\n\n    get '/blog(/page/:page)' =\u003e 'posts#index', :defaults =\u003e {:page =\u003e 1}, :as =\u003e :buttercms_blog\n    get '/blog/:slug' =\u003e 'posts#show', :as =\u003e :buttercms_post\n  end\n```\n\nAfter running the generator, set your API token in `config/initializers/buttercms.rb` and then start your server to view your blog.\n\n### Customization\n\nExtending and customizing your blog is easy. The ButterCMS Rails SDK uses the [ButterCMS Ruby API Client](https://github.com/buttercms/buttercms-ruby). Email [support@buttercms.com](mailto:support@buttercms.com) for help!\n\n### Fallback Data Store\n\nThe ButterCMS Ruby client supports automatic fallback to a data store when API requests fail. Learn more in the [buttercms-ruby README](https://github.com/buttercms/buttercms-ruby/tree/master#fallback-data-store).\n\n### Test mode\n\nTest mode can be used to setup a staging website for previewing content or for testing content during local development. To fetch content from test mode add the following to your initializer:\n\n```ruby\nButterCMS::test_mode = true\n```\n\n### Other\n\nView Rails [Blog engine](https://buttercms.com/rails-blog-engine/) and [Full CMS](https://buttercms.com/rails-cms/) for other examples of using ButterCMS with Rails.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuttercms%2Fbuttercms-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuttercms%2Fbuttercms-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuttercms%2Fbuttercms-rails/lists"}