on-this-day.js

Last updated:

A small JavaScript helper that shows posts from your weblog.lol site that were published on this same date in previous years.

How it works

  1. Fetches your site’s /archive page
  2. Finds posts that match today’s month and day
  3. Fetches and renders the full posts inline
  4. Optionally shows titles (or not)

This assumes you’re using the standard weblog.lol archive structure.

Quick setup

Create a new page on your weblog.lol site and paste the following:

<div id="on-this-day">
Loading...
</div>

<script src="https://scripts.brebs.net/on-this-day/on-this-day.js"></script>

Save the page. That’s it.

Requirements

Get the script

You can use the hosted version directly:

<script src="https://scripts.brebs.net/on-this-day/on-this-day.js"></script>

Self-hosting (if you like doing that)

If you prefer to host the script yourself, you can copy the source and host it anywhere that serves raw JavaScript.

One easy option is use omg.lol amazing service of paste.lol.

  1. Copy or download the code of on-this-day.js
  2. Create a new paste at paste.lol
  3. Name it something like tag-feed.js
  4. Use the /raw version of the paste as your script source
<script src="https://ericmwalk.paste.lol/on-this-day.js/raw"></script>