Skip to content

A simple JavaScript library to serve Webmentions via Webmention.io

License

Notifications You must be signed in to change notification settings

ggirelli/easy-webmention-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easy-webmention-js


A simple JavaScript library to serve Webmentions via Webmention.io

[ Live Demo ]

Requirements

This script requires jQuery v3.3.1+ and Bootstrap v5.0.2+.

Usage

Please, add the following in the <head /> of your pages, after importing Bootstrap and jQuery:

<script type="text/javascript" src="https://ggirelli.github.io/easy-webmention-js/src/easy-webmention.min.js"></script>

Then, place the following where you would like your webmentions to appear:

<!-- WEBMENTIONS -->
<div id="webmentions-wrap" class="border-top pt-2"></div>
<script type="text/javascript">
    $(function () {
        ew_init({
                      "tag" : "{{ site.webmentions.tag }}",       // Webmention.io username
                   "target" : "{{ site.url }}{{ page.url }}",     // This page's URL
            "read_more_uri" : "{{ site.webmentions.help_page }}", // URL to help page (optional)
                  "wrap_id" : "#webmentions-wrap"                 // ID of element where to add webmentions
        });
    });
</script>

About

A simple JavaScript library to serve Webmentions via Webmention.io

Resources

License

Code of conduct

Stars

Watchers

Forks