Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 1 month 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!

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.*