declanbyrd / eleventy-plugin-mastoarchive

Eleventy plugin to expose your Mastodon posts as a global data object.
https://www.npmjs.com/package/eleventy-plugin-mastoarchive
12 stars 1 forks source link

Strip tags from content and return tag data #7

Open declanbyrd opened 6 months ago

declanbyrd commented 6 months ago

If I post with a tag, the post content contains markup similar to:

<a href="https://{{Mastodon host}}/tags/{{tag name}}" class="mention hashtag" rel="tag">#<span>{{tag name}}</span></a>

I would like to be able to remove the markup so that the tags are displayed as plain text within the parent <p> tag.

In addition to this, the tag data should be returned from the API. This would enable Mastodon posts to be added to 11ty collections of the same name.