Leverage GitHub Actions to effortlessly generate and update ATOM feeds from webpages.
This process is scheduled to run daily at 4 AM, 10 AM, and 4 PM.
- Fork this repo.
- In Settings Pages select Github Actions as a Build and deployment source.
- Generate a
config.json
based onconfig.schema.json
- Create the following secrets and variable in Settings Secrets and variables Actions, or by using the GitHub CLI :
name type description PASSWORD secret A password to access your feeds located in a secret folder CONFIG secret Your config.json
encoded in base 64.cat config.json | base64 | gh secret set CONFIG
BASE_URL variable The deployment URL used by Github Pages (ex: https://guillemcanal.github.io/feed-creator), it's used to generate an OPML file with your feed subscriptions. - Run Actions / Generate and Deploy Atom feeds to Pages.
{
// List of content extraction providers
"providers": [
{
// Regex matching a feed URL
"match": "^https://example.com",
// Used to generate the title of the feed
"feedTitle": {
"selector": "h1"
},
// Used to retrieve items for the feed
"items": {
"selector": ".feed-items",
},
// Used to generate the title of an item
"title": {
"selector": ".item-title"
},
// Used to generate the URL of an item
"link": {
"selector": ".item-link",
"attr": "href"
},
// Used to generate the published and updated attributes of an item
"date": {
"selector": "time",
// Use a date format to create a datetime object (optional)
"dateFormat": "M d,Y H:i"
},
// Used to generate the description of an item (optional)
"description": {
"selector": "a.magnet-link",
"attr": "href",
// Decorate the extracted text (optional)
"template": "<a href=\"%s\">download</a>"
}
}
],
// List of URLs used to generate Atom feeds
"urls": [
"https://example.com/news",
"https://example.com/articles"
]
}
...