Move docs to wiki; update readme

This commit is contained in:
Nathan Upchurch 2024-07-09 12:15:30 -05:00
parent 54ec74c6ed
commit 836463ad92

View File

@ -1,69 +1,17 @@
# nathanupchurch.com
My blog, based on the very helpful eleventy-base-blog v8.
# My 11ty Blog
My blog, originally based on the very helpful eleventy-base-blog v8, although it has come a long way from its humble beginnings. For documentation, check [the wiki](https://upchur.ch/gitea/n_u/nathanupchurch.com/wiki).
![](https://upchur.ch/piwigo/i.php?/upload/2023/09/22/20230922131353-32037f24-la.png)
## Features
### Fediverse Integration
* Mastodon [toot embedding](https://upchur.ch/gitea/n_u/nathanupchurch.com/wiki/Home#embed-a-toot-from-mastodon-using-the-toot-shortcode)
* [Commenting](https://upchur.ch/gitea/n_u/nathanupchurch.com/wiki/Home#adding-comments-via-mastodon) via Mastodon
## Documentation
### Indieweb
* [Auto-generated linktree-style page](https://upchur.ch/gitea/n_u/nathanupchurch.com/wiki#me) for the blog owner with support for custom attributes such as: `rel="me"`
* Built in support for [webring links](https://upchur.ch/gitea/n_u/nathanupchurch.com/wiki#webrings)
### 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.
### Weird and Wonderful
* [Accessible cowsay output embedding](https://upchur.ch/gitea/n_u/nathanupchurch.com/wiki#add-a-cowsay-to-a-post)
#### /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"
}
]
```
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.
### Quality of Life
* Copyright notice, default post image, alt text, and author details defined in `metadata.js`.