Rebuilding Eagle, my website's CMS

My website is growing, not in terms of views, because I’m not aware of that. Maybe I should add some non-intrusive analytics. Anyways, it’s growing in terms of functionality. However, since I’m using a static website generator, it makes it complicated to add some interactive functionalities.

One of those features is ActivityPub. ActivityPub is, in the words of the spec:

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format. It provides a client to server API for creating, updating and deleting content, as well as a federated server to server API for delivering notifications and content.

I have tried to build complete support for ActivityPub in the website before, but it didn’t succeed and I ended up just removing it instead of fixing it. In the meanwhile, I thought about creating a Pleroma instance, but what’s the point? I already have a section for micro posts. Thus, the website itself should be able to interact with the “outside world”. By outside world, I mean all the other ActivityPub servers, such as all Pleroma and Mastodon instances.

Another feature I want to support is search. Why? “Can’t you just use Google’s site search?”, you ask. Yes, I could, but it wouldn’t be as great, nor as updated. Also, by implementing my custom search for this website, I could use some engine that allowed for fancy filters.

Right now, my website already supports Micropub and Webmentions, so it’s kind of interactive already, despite being static. It is simply rebuilt every time. Thanks to Hugo, the static website generator I use, that is quite a fast process (2 seconds ยฑ).

So my idea is not to create a full-blown CMS, just like @jlelse is doing, but to create a wrapper around Hugo. Well, if we consider a CMS to be literally a ‘Content Management System’, then that’s what I want to build, but the generation of pages will still be done by Hugo.

I can see two main advantages: 1. I can focus on the functionality I want to build without having to worry about template parsing and all that - just keep it as it is! - and; 2. the static result can still be hosted in IPFS or any other decentralized shared file system.

This is not the first time I think about building my own CMS though. I had the same thoughts during quarantine, a few months ago, but ended up not implementing anything. Right now, I managed to move my old API from Node.js to Go and I’m quite happy with the result.

I managed to migrate the Micropub, Webmentions and all other services I had to the new Go system. And… I just hope everything is working. I tested it thoroughly on a testing domain and it seemed fine and fixed all te bugs I could find. I’m pretty sure more will show up soon, but that’s something for another day!

With this change, I managed to implement search! I am using a search engine called MeiliSearch, which is built in Rust, and blazing fast. Just try it out! I didn’t implement the “update results while typing thing” so you need to press the button. It works! And it is fast!

In the future, I want to fully support ActivityPub though. I still need to implement my Inbox to make it fully work! Well… I know this was a different post than the other days, but I hope you enjoyed it!

Or if you don't know what a response is, you can always write a webmention comment (you don't need to know what that is).

1 interaction
Jan Boddez Jan Boddez said: In reply to https://hacdias.com/articles/2020/10/rebuilding-eagle-cms/. Interestingly, your h-feeds seem (somewhat) broken now. Like, could your entries be missing a u-url? I also seem to be missing photos in older postsโ€”again, in my h-feed reader. Iโ€™d dig a bit deeper, but โ€œposting from my phone,โ€ โ€ฆ โ€” 12 Oct 2020 15:12