Update Home

Nathan Upchurch 2024-07-09 13:02:54 -04:00
parent e35d0d2542
commit dda242b40f

52
Home.md

@ -1,16 +1,56 @@
# Documentation
## Metadata
Features configured in `metadata.js`.
### [[/me]] - a linktree style page for the blog owner's social links
### [[Webrings]] - Webring links that appear beneath the copyright notice
Features configured in `metadata.js`:
### /me
Links at /me are configured in `metadata.js` like so:
``` javascript
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:
``` javascript
webrings: [
{
name: "Fediring",
ringURL: "https://fediring.net/",
previousURL: "https://fediring.net/previous?host=nathanupchurch.com",
nextURL: "https://fediring.net/next?host=nathanupchurch.com"
}
]
## Mastodon Integration
Integrate Mastodon toots into blog posts.
### [[Embed a toot]]
### [[Add Mastodon commenting]]
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:
## Other Special Features
Special or uncommon features of this blog that aren't configured in `metadata.js`.
### [[Cowsay]] - create posts with embedded cowsay outputs
### 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.