Shortcode for Hugo to display the replies to a Fediverse-thread as blog comments.
Go to file
tastytea bf1e1d0cf5
Initial commit.
2019-10-31 05:40:23 +01:00
README.adoc Initial commit. 2019-10-31 05:40:23 +01:00
mastodon-api-comments.html Initial commit. 2019-10-31 05:40:23 +01:00
mastodon-api-comments.js Initial commit. 2019-10-31 05:40:23 +01:00

README.adoc

mastodon-api-comments

Setup

First copy mastodon-api-comments.html to your shortcodes directory. This is either layouts/shortcodes or themes/{your-theme}/layouts/shortcodes.

Then download mastodon.js and JQuery and copy it together with mastodon-api-comments.js from this repo into content/scripts.

Then add the following code to layouts/partials/mastodon-api-comments-scripts.html or themes/{your-theme}/layouts/partials/mastodon-api-comments-scripts.html:

<script type="application/javascript" src="/scripts/jquery-3.4.1.min.js"></script>
<script type="application/javascript" src="/scripts/mastodon.js"></script>
<script type="application/javascript" src="/scripts/mastodon-api-comments.js"></script>

Usage

The shortcode takes the following arguments:

Argument Description

instance

The domain name of the instance.

status_id

The ID of the status.