openring + webring, build a suckless web
openring and webring are two orthogonal projects that are dedicated to build a decentralized web of independent blogs. The openring is a program written in GO that pulls RSS feeds from a list of URLs and render 3 of the newest articles into html that can be integrated into static site generators. The webring is a well maintained collection of blogs:
This webring is an attempt to inspire artists & developers to create and maintain their own personal websites, and share traffic among each other. The webring’s aim is to share rich hand-crafted websites such as diaries, wikis & portfolios. (from the webring README)
So here is the thing: why not both? I wrote some (perhaps ugly) codes to glue them together. Here is how:
A sweet combination
For this example: I’m using Hugo as my blog generator, but it’s pretty easy to opt in any static site generator. You need the openring (see url above) to render the feeds.
include webring contents into blog template:
in blog/themes/my-theme/layouts/index.html
I have:
|
|
the webring.html
partial can be simply an empty file, we will fill it up with
openring later1.
create a template for openring
the openring project provides an example template in.html
, you can simply use
it. Here is a simpler version:
|
|
fetch webring and render it into blog
Essentially, I have this one-liner to glue webring and openring together:
|
|
A toplevel overview
XXIIVV/
webring openring_template.html
| |
| $curl | grep |
| |
v v
{rss urls} ---------> openring
|
v
webring.html
|
| (include partial)
v
hugo
|
V
+--------------+
| a better web |
+--------------+
disclaimer : ‘suckless’ in the title does not refer to suckless.org
-
if you manage your blog with VCS, it’s better to exclude this file to avoid noise. ↩︎
[+] click to leave a comment [+]
>> SEND COMMENT <<