{"id":13778795,"url":"https://github.com/refinery/refinerycms-news","last_synced_at":"2025-04-07T13:07:27.359Z","repository":{"id":52410137,"uuid":"545852","full_name":"refinery/refinerycms-news","owner":"refinery","description":"News Plugin for Refinery CMS","archived":false,"fork":false,"pushed_at":"2023-04-15T22:44:11.000Z","size":438,"stargazers_count":121,"open_issues_count":10,"forks_count":120,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-31T11:06:12.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.refinerycms.com","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/refinery.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2010-03-04T03:31:18.000Z","updated_at":"2023-12-03T01:18:12.000Z","dependencies_parsed_at":"2024-01-11T00:05:29.310Z","dependency_job_id":"e24233c3-eb5d-4117-91a9-8bb40d431550","html_url":"https://github.com/refinery/refinerycms-news","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refinery%2Frefinerycms-news","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refinery%2Frefinerycms-news/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refinery%2Frefinerycms-news/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refinery%2Frefinerycms-news/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refinery","download_url":"https://codeload.github.com/refinery/refinerycms-news/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"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":[],"created_at":"2024-08-03T18:00:57.556Z","updated_at":"2025-04-07T13:07:27.342Z","avatar_url":"https://github.com/refinery.png","language":"Ruby","funding_links":[],"categories":["Refinery team extensions"],"sub_categories":["Frontoffice extensions"],"readme":"# Refinery CMS News\n\n[![Build Status](https://travis-ci.org/refinery/refinerycms-news.svg?branch=master)](https://travis-ci.org/refinery/refinerycms-news)\n\n## About\n\n__Refinery's news engine allows you to post updates to the news section of your website.__\n\nKey features:\n\n* Default news page shows a summary of recent news posts\n* Detail view shows the full post and also linked to recent news on the \"side bar\"\n\n## Requirements\n\n[Refinery CMS](http://refinerycms.com) \"core\" engine version 2.0.0 or later.\n\n### Gem Installation using Bundler (The very best way)\n\nInclude the latest [gem](http://rubygems.org/gems/refinerycms-news) into your Refinery CMS application's Gemfile:\n\n```ruby\ngem \"refinerycms-news\", '~\u003e 2.1.0'\n```\n\nThen type the following at command line inside your Refinery CMS application's root directory:\n\n    bundle install\n    rails generate refinery:news\n    rake db:migrate\n    rake db:seed\n\n## How to display a news feed on the homepage:\n\nAssuming you've already overridden the homepage view:\n\n    $ rake refinery:override view=refinery/pages/home\n\nYou can render the `recent_posts` partial. However, you will need to set the recent News items manually, since this is normally handled in the News::Items controller:\n\n```erb\n\u003c% @items = Refinery::News::Item.latest(5) %\u003e\n\u003c%= render :partial =\u003e '/refinery/news/items/recent_posts' %\u003e\n```\n\n## Configuring the number of items per page\n\nTo modify the number of items per page for the news items index without\naffecting the archive page you must override the method in the controller that\nsets `@items` for the index: `find_published_news_items`.\n\nCurrently the method body is:\n```ruby\n@items = Item.published.translated.page(params[:page])\n```\n\nThe `page` convenience method needs to be replaced with `paginate` and\n`per_page` passed as an option.  Add a decorator for the items controller with\nthe following contents:\n\n```ruby\nmodule Refinery::News\n  ItemsController.class_eval do\n    def find_published_news_items\n      @items = Item.published.translated.paginate :page =\u003e params[:page],\n                                                  :per_page =\u003e 8\n    end\n  end\nend\n```\n\n## Customising the views\n\nType this command at your project root to override the default front end views:\n\n    $ rake refinery:override view=refinery/news/items/*\n    Copied view template file to app/views/refinery/news/items/_recent_posts.html.erb\n    Copied view template file to app/views/refinery/news/items/index.html.erb\n    Copied view template file to app/views/refinery/news/items/show.html.erb\n    etc.\n\n## RSS (Really Simple Syndication)\n\nTo get RSS for your entire site, insert this into the head section of your layout after installing:\n\n```erb\n\u003c%= auto_discovery_link_tag(:rss, refinery.news_items_url(:format =\u003e 'rss')) %\u003e\n```\n\n## More Information\n* Check out our [Website](http://refinerycms.com/)\n* Refinery Documentation is available in the [guides](http://refinerycms.com/guides)\n* Questions can be asked on our [Google Group](http://group.refinerycms.org)\n* Questions can also be asked in our IRC room, [#refinerycms on freenode](irc://irc.freenode.net/refinerycms)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefinery%2Frefinerycms-news","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefinery%2Frefinerycms-news","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefinery%2Frefinerycms-news/lists"}