How to use Osmosfeed with GitLab

Robin Naundorf
2 min readAug 12, 2021

--

I recently came across a project called Osmosfeed. It is described as “An RSS reader running entirely from your GitHub repo.”

Normally Osmosfeed makes use of GitHub Actions to fetch the feeds, compile it to a nice looking page and publish it to GitHub Pages.

I tried to port this behaviour to GitLab Pages.

So here is how to get it working:

Create new Project by Importing the Template
  1. Create a new Project by importing the Template from the osmosfeed-template: https://github.com/osmoscraft/osmosfeed-template

2. Give it a nice name

3. Create a GitLab CI Configuration:

image: node:latest
stages:
- deploy
pages:
stage: deploy
script:
- npm install
- npm run build
artifacts:
paths:
- public

4. Update your osmosfeed.yaml with your cacheUrl:

cacheUrl: https://senk.gitlab.io/osmosfeed-demo/cache.json
sources:
- href: https://github.com/osmoscraft/osmosfeed/releases.atom
- href: https://css-tricks.com/feed/
- href: https://www.smashingmagazine.com/feed/
- href: https://www.freecodecamp.org/news/rss/

5. Setup a schedule for updating the feed

I choose to leave it as is (daily at 9am)

6. Grab your URL from the Settings

Thats it. You now have a running version of Osmosfeed served via GitLab Pages.

You can find the demo at https://gitlab.com/senk/osmosfeed-demo

--

--