{"id":19692185,"url":"https://github.com/getgrav/grav-plugin-feed","last_synced_at":"2025-04-29T09:31:23.627Z","repository":{"id":19318782,"uuid":"22556961","full_name":"getgrav/grav-plugin-feed","owner":"getgrav","description":"Grav Feed Plugin","archived":false,"fork":false,"pushed_at":"2024-05-13T09:13:19.000Z","size":433,"stargazers_count":18,"open_issues_count":19,"forks_count":13,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-04-19T07:44:33.402Z","etag":null,"topics":["feed","grav","grav-plugin","rss","rss-feed","syndication"],"latest_commit_sha":null,"homepage":"https://getgrav.org","language":"PHP","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/getgrav.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2014-08-02T20:39:52.000Z","updated_at":"2025-01-25T14:20:18.000Z","dependencies_parsed_at":"2023-11-10T15:03:51.438Z","dependency_job_id":"84604ec2-213b-43e5-9ac6-6d7bbd1efba1","html_url":"https://github.com/getgrav/grav-plugin-feed","commit_stats":{"total_commits":109,"total_committers":21,"mean_commits":5.190476190476191,"dds":0.4311926605504587,"last_synced_commit":"e3581e4ae86ea87fa52e7ed4fb1cfefa417b1022"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-feed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-feed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-feed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-feed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getgrav","download_url":"https://codeload.github.com/getgrav/grav-plugin-feed/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251166789,"owners_count":21546268,"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":["feed","grav","grav-plugin","rss","rss-feed","syndication"],"created_at":"2024-11-11T19:12:31.787Z","updated_at":"2025-04-29T09:31:23.600Z","avatar_url":"https://github.com/getgrav.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grav Syndication Feed Plugin\n\n![Feed](assets/readme_1.png)\n\n`feed` is a [Grav](http://github.com/getgrav/grav) plugin and allows Grav to generate feeds of your pages.\n\nThis plugin supports __Atom 1.0__, __RSS__ and __JSON__ feed types. Enabling is very simple. just install this plugin in the `/user/plugins/` folder in your Grav install. By default, the plugin is enabled and provides some default values.\n\n| NOTE: JSON feeds must be enabled manually in the plugin configuration as the `.json` extension is commonly used and this can conflict with other plugins.\n\nIf you do enable the JSON feed, you will want to edit `feed.json.twig`. Replace the placeholder data on lines 2 and 3 (`feed_url` and `author:url`) with your own data. You may also want to change the formatting of the date on lines 8 and 9.\n\n# Installation\n\nInstalling the Feed plugin can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file. \n\n## GPM Installation (Preferred)\n\nThe simplest way to install this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm) through your system's Terminal (also called the command line).  From the root of your Grav install type:\n\n    bin/gpm install feed\n\nThis will install the Feed plugin into your `/user/plugins` directory within Grav. Its files can be found under `/your/site/grav/user/plugins/feed`.\n\n## Manual Installation\n\nTo install this plugin, just download the zip version of this repository and unzip it under `/your/site/grav/user/plugins`. Then, rename the folder to `feed`. You can find these files either on [GitHub](https://github.com/getgrav/grav-plugin-feed) or via [GetGrav.org](http://getgrav.org/downloads/plugins#extras).\n\nYou should now have all the plugin files under\n\n    /your/site/grav/user/plugins/feed\n\n\u003e\u003e NOTE: This plugin is a modular component for Grav which requires [Grav](http://github.com/getgrav/grav), the [Error](https://github.com/getgrav/grav-plugin-error) and [Problems](https://github.com/getgrav/grav-plugin-problems) plugins, and a theme to be installed in order to operate.\n\n# Usage\n\nThe feeds work for pages that have sub-pages, for example a blog list view. If your page has a `content`, then the RSS plugin will automatically be enabled. Simply append either `.atom`, `.rss` or `.json` to the url.  For example, if you have a blog page that defines a `content` header to display a list of blog pages in a list, and the URL is `http://www.mysite.com/blog` then the feed would simply be:\n\n```\nhttp://www.mysite.com/blog.atom\n```\n\nor\n\n```\nhttp://www.mysite.com/blog.rss\n```\n\nor\n\n```\nhttp://www.mysite.com/blog.json\n```\n\n## Autodiscovery\n\nTo let feed readers discover the feed automatically, add a link to your HTML `\u003chead\u003e` tag:\n\n```\n\u003clink rel=\"alternate\" type=\"application/atom+xml\" title=\"My Feed\" href=\"{{ base_url }}.atom\" /\u003e\n\u003clink rel=\"alternate\" type=\"application/rss+xml\" title=\"My Feed\" href=\"{{ base_url }}.rss\" /\u003e\n\u003clink rel=\"alternate\" type=\"application/json\" title=\"My Feed\" href=\"{{ base_url }}.json\" /\u003e\n```\n\n## Creating Feed Buttons in Your Pages\n\nJust having the plugin loaded and activated is enough to get it working, but you can help users find your feeds by creating buttons in the body of your page users can easily discover and click on to access the feeds.\n\nIn our [Blog Skeleton] demo, you will see these buttons located in the sidebar under the heading `Syndicate`. This was done very easily by adding the following information to the `sidebar.html.twig` template file found under `/user/themes/antimatter/templates/partials/`.\n\n```\n\u003ca class=\"button\" href=\"{{ base_url }}.atom\"\u003e\u003ci class=\"fa fa-rss-square\"\u003e\u003c/i\u003e Atom 1.0\u003c/a\u003e\n\u003ca class=\"button\" href=\"{{ base_url }}.rss\"\u003e\u003ci class=\"fa fa-rss-square\"\u003e\u003c/i\u003e RSS\u003c/a\u003e\n```\n\nThe first line adds the **Atom** feed by simply adding `.atom` to the base URL of the site, while the second handles RSS. This a very simple way to add a useful feature to your site that your visitors will enjoy.\n\n# Config Defaults\n\n```\nenabled: true\nlimit: 10\ntitle: 'My Feed Title'\ndescription: 'My Feed Description'\nlength: 500\nenable_json_feed: false\nshow_last_modified: false\n```\n\nYou can override any of the default values by setting one or more of these in your blog list page where `sub_pages` is defined. For example:\n\n```\ntitle: Sample Blog\ncontent:\n    items: @self.children\n    limit: 5\n    pagination: true\nfeed:\n    limit: 15\n    description: Sample Blog Description\n```\n\nYou can ensure a particular page is skipped from the feed by adding the following in the frontmatter header:\n\n```\ntitle: Sample Blog\nfeed:\n    skip: true\n```\n\n# Updating\n\nAs development for the Feed plugin continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating Feed is easy, and can be done through Grav's GPM system, as well as manually.\n\n## GPM Update (Preferred)\n\nThe simplest way to update this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm). You can do this with this by navigating to the root directory of your Grav install using your system's Terminal (also called command line) and typing the following:\n\n    bin/gpm update feed\n\nThis command will check your Grav install to see if your Feed plugin is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type `y` and hit enter. The plugin will automatically update and clear Grav's cache.\n\n## Manual Update\n\nManually updating Feed is pretty simple. Here is what you will need to do to get this done:\n\n* Delete the `your/site/user/plugins/feed` directory.\n* Downalod the new version of the Feed plugin from either [GitHub](https://github.com/getgrav/grav-plugin-feed) or [GetGrav.org](http://getgrav.org/downloads/plugins#extras).\n* Unzip the zip file in `your/site/user/plugins` and rename the resulting folder to `feed`.\n* Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in terminal and typing `bin/grav clear-cache`.\n\n\u003e Note: Any changes you have made to any of the files listed under this directory will also be removed and replaced by the new set. Any files located elsewhere (for example a YAML settings file placed in `user/config/plugins`) will remain intact.\n\n## Overriding the default feed template:\n\nSometimes, you may wish to use a different template for an RSS/ ATOM/ JSON feed.  To override a feed's template, place the following in the page header:\n``` yaml\nfeed:\n    template:\n        rss: my-override\n```\n\nCreate the `my-override.rss.twig` in your theme/ plugin's `templates` folder and add it to your [twig template paths](https://learn.getgrav.org/17/cookbook/plugin-recipes#custom-twig-templates-plu).  Change `*.rss.*` to `*.atom.*` or `*.json.*` to override those page types.\n\n## Nginx Note:\n\nIf you are having trouble with 404s with Nginx, it might be related to your configuration. You may need to remove the feed extensions from the list of types to cache as static files: `.xml`, `.rss`, and `.atom`. For example:\n\n```nginx\n# Cache static files\nlocation ~* \\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf)$ {\n  add_header \"Access-Control-Allow-Origin\" \"*\";\n  access_log off;\n  log_not_found off;\n  expires max;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetgrav%2Fgrav-plugin-feed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetgrav%2Fgrav-plugin-feed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetgrav%2Fgrav-plugin-feed/lists"}