Your comments are welcome
2025 Jan 14 2025 (E: 2025 Nov 15)
View 4 comment(s).You can comment on my blogs from the Fediverse by replying to specific statuses listed at the bottom of the page.1
If you want to use the filter your website, you’re also welcome too.
Comments for your own site
Here are minimum working examples.
Invocation:
If your instance requires authorization for API access, there is an extra step.
Manuscript:
HTML Template:
<!DOCTYPE html>
<html>
<head>
<title>$title$</title>
</head>
<body>
$if(pleroma-has-comments)$
<a href="#comments">View $pleroma-comments-count$ comment(s).</a>
$endif$
$body$
$if(pleroma-urls)$
<hr/>
<h2 id="comments">Comments ($pleroma-comments-count$)</h2>
<ul>
$for(pleroma)$
<li><a href="$pleroma.link$">$pleroma.id$</a></li>
$endfor$
</ul>
$pleroma-comments$
$endif$
</body>
</html>If authorization is required
The following links describe how to authorize an application (this
Lua filter) by acquiring an access token. This phase involves using
curl and/or a web browser.
Register the Lua filter (the “application” = the “client”) with the instance. https://docs.joinmastodon.org/client/token/#creating-our-application
Authorize the client to access the account. https://docs.joinmastodon.org/client/authorized/#client
After following the aforementioned steps, the server should have
returned an access token. Upon visiting yourinstance.tld
in a web browser, if you open
Settings > Security: OAuth Token, the change should be
reflected there. You, the user, can always revoke the token if needed
be.
In your local file system and the working directory where
pandoc is executed, make or edit a file named
config.lua:
-- don't include protocol:// or '/' at the end
pleroma_auth["yourinstance.tld"] = "your_access_token"Execute pandoc as described previously.
Configuration
In config.lua …
Case: you want avatars on your own server either for archival purposes or to avoid hotlinking.
-- both variables must not be nil
-- don't forget to put a '/' at the end
-- this is the path to which the avatar is downloaded
pleroma_avatar_save_path = "path/to/folder/"
-- this is the path rendered on the page
pleroma_avatar_path = "path/to/folder/"Case: your instance limits conversations to signed-in users; random visitors from the web can not load posts including the reply button. Therefore, provide the link of the reply button.
pleroma_reply_href = "/main/ostatus?status_id="This Lua filter is shared with: https://antares.neocities.org/blog/pandoc-filter-pleroma-comments. It’s also his idea.↩︎