Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmdr-nova/dynamic_mastodon_info
Include JavaScript on your website that automatically updates your author name and an avatar image with whatever your Mastodon account is using!
https://github.com/cmdr-nova/dynamic_mastodon_info
author avatar dynamic image mastodon media name social
Last synced: about 12 hours ago
JSON representation
Include JavaScript on your website that automatically updates your author name and an avatar image with whatever your Mastodon account is using!
- Host: GitHub
- URL: https://github.com/cmdr-nova/dynamic_mastodon_info
- Owner: cmdr-nova
- Created: 2024-11-15T19:30:36.000Z (1 day ago)
- Default Branch: main
- Last Pushed: 2024-11-15T19:47:05.000Z (1 day ago)
- Last Synced: 2024-11-15T20:27:42.707Z (1 day ago)
- Topics: author, avatar, dynamic, image, mastodon, media, name, social
- Language: JavaScript
- Homepage: https://nova.mkultra.monster
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dynamic_mastodon_info
Include JavaScript on your website that automatically updates your author name and an avatar image with whatever your Mastodon account is using!How to get this to work:
Save both JavaScript files into a directory on your website. Make sure to include this in the head:
``````
Be sure to replace this section at the top of each script with whatever your Mastodon profile is.
```
https://your.mastodon.profile
```Then, let's say you're writing blog posts on your site, and you want these elements to update automatically with whatever it says on your Mastodon profile, *even if you change it* (elminating the need to update a bunch of things, taking up sweet, sweet time).
Include "dynamic-avatar" as a class on an IMG element, and include "author-link" as a class in an tag.
Example:
```
Author: {{ page.author }}
```
(the liquid isn't necessary, this is just part of Jekyll making calls to the front matter of a post, which I'm overriding)And voila! Now your avatar and author name will update automatically on your website *any time you change them on Mastodon.*