maxboeck / webmentions-component

A webcomponent to display webmentions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webmentions Component

A webcomponent to display webmentions using the webmention.io API.

Prerequisites

To start using webmentions on your site, you must first declare an endpoint for them. See the webmention.io document for that. Once you're signed up, add this link tag to you site's <head>.

<link rel="webmention" href="https://webmention.io/example.com/webmention" />

Additionally, you may want to set up Bridgy to forward your social media reactions to your webmentions.

Usage

<head>
    ...
    <script type="module" src="./src/web-mentions.js"></script>
</head>
<web-mentions>
    <noscript>Could not render webmentions. Check that JavaScript is enabled.</noscript>
</web-mentions>

Attributes

Name Description Example Value Default
url The target URL for your webmentions https://example.com/my-post/ current URL (window.location.href)
types which webmention type to include like-of in-reply-to,mention-of
size Page size for the API 5 10

About

A webcomponent to display webmentions

License:MIT License


Languages

Language:JavaScript 88.8%Language:HTML 11.2%