/micromemories

Add an "On This Day" feature to a Micro.blog website

Primary LanguagePython

Micro Memories

Code used for creating an "On This Day" page for a Micro.blog hosted website.

Currently used on my wife's site.

To use, simply create a page on your Micro.blog website with the following content:

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

<script src="https://micromemories.cleverdevil.io/js?tz=US/Pacific"></script>

This will inject some JavaScript into the page, which will then discover and crawl your /archive page, and populate the content for you.

Make sure to pass the appropriate time zone. If none is specified in the request for the JavaScript, then 'US/Pacific' will be assumed. For a full listing of available time zone strings, refer to the IANA time zone database.

Requirements

Micro Memories is known to work on all of the standard themes in Micro.blog. If you are using a custom theme, you need to ensure that your theme makes proper use of microformats, especially the h-entry microformat. The open source Micro.blog themes are a good place to look for guidance.

To ensure a good experience, your posts should be marked up with the h-entry microformat, with a u-url property, a p-name property, a dt-published property, and a e-content property. To check how your posts parse with a microformats2 parser, you can use the tool on microformats.io to verify that all properties are being discovered.