A really simple webring server that generates a homepage with 88x31 buttons https://webring.emmaa.tech/
Find a file
2026-09-30 21:09:00 +02:00
.gitignore now has a less terrible name 2026-09-30 20:13:04 +02:00
go.mod now has a less terrible name 2026-09-30 20:13:04 +02:00
index.html.example now has a less terrible name 2026-09-30 20:13:04 +02:00
LICENSE readme + license 2026-02-13 02:25:55 +01:00
main.go allow off-site links to buttons 2026-09-30 21:09:00 +02:00
README.md allow off-site links to buttons 2026-09-30 21:09:00 +02:00
sites.txt.example allow off-site links to buttons 2026-09-30 21:09:00 +02:00

shallot

a really simple webring server that generates a homepage with 88x31 buttons. onions have rings and shallots are the best onions.

inspired by these two webrings that i somehow found while browsing the internet that also finally pushed me down the indie web rabbit hole

usage

each site should be a line in sites.txt and should be of the form {slug}|{url}|{alt text for button}|{button url}. make sure to not forget a vertical bar! if you leave the alt text blank, no button will be shown on the homepage. if you leave the button url blank it will try to fetch from /static/buttons/{slug}.gif by default, as long as you have an alt text.

a template for the homepage must also exist in index.html, where the string %MEMBER_LIST% will be replaced by a list of slugs and their corresponding buttons (or just links).

both of these files have examples provided.

when all that jazz is finished you can just run the compiled program using ./shallot. by default it listens on port 5000, but that can be changed using the environment variable PORT.

linking

each site in the webring should include the following links somewhere accessible:

  • webring.test/next?ref={your slug}
  • webring.test/prev?ref={your slug}
  • optionally webring.test/rand?ref={your slug}

styling

if you want to style the homepage you can either use inline css in the homepage template, or link to a css file in ./static, which gets served automatically. the generated member list uses the id site-list and class site-item if you want to style those differently. more specifically it replaces %MEMBER_LIST% with the following:

<ul id=site-list>
  <li class=site-item>{slug}: <a href={url}>
    <img src={button url} width=88 height=31 alt={alt text} title={url}>
  </a></li>
</ul>

the entire img-tag is replaced with the url-text in case no alt text is provided, as explained earlier (really janky, i know).