DEV Community

Fernando Tricas García
Fernando Tricas García

Posted on

So, yo wan to build a personal aggregator with Jekyll?

With the last upgrade of my computer (Hello jammy!) the tool I was using to maintain my personal aggregator started to fail. I was happily using an unmaintained tool that provided a way to have a personal home page collecting my activity on the net and joining it together.
The concept of personal aggregator comes from the news aggregator or Feed reader. It is also related with the Planet concept, in the sense that it generates a page with selected content giving some sense of community or relationship.
There are some commercial products. such as: Linktree, to name one that is quite popular nowadays or about.me to remember some older contenders.

But where is the fun when you use the tools that other provide?

I was using PubWichFork, by Michael Haschke, which provided a way to generate the page sometimes (mainly at some times and/or when somebody visited it) and had a nice template and layout (later more on this). The last commit is fro 2019 and, as I said above, it had some error that I do not wanted to debug (I'm not very good at PHP programming).

I did some quick searches to check for alterantives, but I did not find any interesting alternative so I asked myself if it would make sense to try to program my own thing, with:

  • Jekyll I've been preparing several sites during last months and I feel quite comfortable with them: look for a template, modify it, put your content and go on.
  • My own socialModules. I've got a set of tools to consume content from some sites (RSS in this case, but also Twitter, the raising star Mastodon, ....) and then manage them in an homogeneous way. In this case it would be just downloading the content, selecting title and links, ...

For the presentation part I selected the cards template, by Sharath Kumar. The reason was that this template provides a grid-like aspect, which I think is the more adequate to present the content in my aggregator. You can see the example page in: Cards example.
Some modifications were needed (and maybe some more will be done) because it is a porfolio oriented site and, in our case, we do not need pagination, for example.

The images are not needed, neither. I would like to have a compact site and images can make the page more attractive, but each post is bigger than needed.
Finally (for the moment, more decissions will come) the colors: as I said before the previous publishing system had a nice template and I wanted to maintain theoriginal aspect. This is easy to do because Jekyll provides a way to include a _custom.css style sheet, and I could reuse the old one.

For the content my idea was to set a set of posts which contain the titles and links of the selected site. For example, for this site you can see the following image:

dev.to section

The program to generate the content is quite easy: for each site you read the original content, select the parts you want to publish and generate a post (for the _posts that will be presented using the format provide by your template.

We have added categories to the posts in order to be able to present them in an adquate way: this is an idea that comes from PubWichFork, where the headers of each section were shown with the colors of the site. For example, the Twitter color is (as shown in BrandColors):

color: #55acee;
Enter fullscreen mode Exit fullscreen mode

Since this is not a dynamic approach (as a PHP based one would be), we need to setup some cron job that generates the posts, builds the site and publish once each hour (for example).

I'm thinking that, maybe, I could have used some templating system, since you do not need the features of a complete site construction infrastructure as Jekyll, but I didn't found something like this available, and I was more familiar with the CMS approach.

So far, so good. This has been a presentation of some introductory ideas of a small project.

You can visit the result at El Mundo Es Imperfecto.

El Mundo Es Imperfecto image

The program that generates the posts is personalAggregator.py (it needs to install socialModules's dist branch with its requirements:

pip install social-modules@git+ssh://git@github.com/fernand0/socialModules@dist 
Enter fullscreen mode Exit fullscreen mode

Some configuration is needed, please, read the code.

Finally, the personal aggregator's Jekyll site needs to be cloned and adapted.

Some more configuration is needed to build the site (calling personalAggregator.py) and then jeyll build. There is a shell script in _bin directory that will work with some adaptation.

Top comments (0)