2024-07-09 11:36:02 -05:00
2024-07-09 11:39:02 -05:00
2024-07-09 11:36:02 -05:00
2024-07-09 11:39:02 -05:00
2023-01-23 11:37:44 -06:00
2018-01-16 21:08:47 -06:00
2022-05-13 16:11:39 -05:00
2024-07-09 11:39:02 -05:00
2023-08-01 16:36:56 -05:00
2023-01-24 10:38:55 -06:00
2024-07-09 11:36:40 -05:00
2024-07-09 11:36:16 -05:00
2023-07-05 11:06:31 -05:00

nathanupchurch.com

My blog, based on the very helpful eleventy-base-blog v8.

Documentation

Metadata

Site metadata such as author info, title, etc. lives in _data/metadata.js. Links on the /me page, and default post images are also configured here.

/me

Links at /me are configured in metadata.js like so:

socialLinks: [
	{
		title: "My Blog",
		linkURL: "https://nathanupchurch.com",
		linkDisplay: "My Blog",
		iconURL: "/img/logo.svg"
	}
]

Any links added here will render on the /me page.

Webrings

Webrings configured in metadata.js will display in the footer of most pages beneath the copyright notice:

webrings: [
	{
		name: "Fediring",
		ringURL: "https://fediring.net/",
		previousURL: "https://fediring.net/previous?host=nathanupchurch.com",
		nextURL: "https://fediring.net/next?host=nathanupchurch.com"
	}
]

Any links added here will render on the /me page.

Add a cowsay to a post

You can use the cowsay filter to output a captioned <figure> containing a copy of an output from the cowsay program. Instead of using the usual three backticks, this method is accessible to visually impaired users thanks to the automatic captioning. Here's how to do it:

  1. Add a copy of the cowsay output you'd like to display to _data/cowList.js. Be sure and escape any backslashes.
  2. Use the filter like this: {{ cowList.name | cowsay | safe }}.

The safe filter is necessary so that Eleventy doesn't sanitize our HTML.

Embed a toot in a post

Embed a toot from Mastodon using the toot shortcode:

{% toot "instance", "tootID" %}

For example:

{% toot "lounge.town", "112672230453089386" %}

Embedded toots are live, so if the toot or instance is not reachable, the toot will not be shown on the page. I haven't built any error handling for this yet.

Adding comments via Mastodon

Simply add a toot ID to a post's frontmatter using the mastodon_id key in order to enable commenting via Mastodon:

mastodon_id: "111688829907363670"

The toot at the given ID will be embedded in a comment section at the bottom of the post; users can reply to the post on Mastodon and their replies will automatically be embedded on the post.

Like embedding a toot, comments are live and rely on the instance and toots / comments to be reachable on the remote server.

I also have not added any error handling for this, nor have I added any sort of moderation at this point.

Description
Languages
JavaScript 50.9%
Nunjucks 25%
CSS 22.2%
XSLT 1.8%
HTML 0.1%