Skip to content

Commit

Permalink
Release v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffy-critter committed Mar 26, 2020
1 parent e9ce01e commit 4104513
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ Client-side library for rendering webmentions from [webmention.io](https://webme

## Usage

1. Copy the Javascript file from the `static/` directory to somewhere on your
website
1. Copy the Javascript file (`webmention.min.js`) from the `static/` directory to
somewhere on your website
2. Put a `<div id="webmentions"></div>` where you want your webmentions to be
embedded
3. Put a `<script src="/path/to/webmention.js" async></script>`
3. Put a `<script src="/path/to/webmention.min.js" async></script>`
somewhere on your page (typically inside `<head>` but it doesn't really
matter), replacing `/path/to/` with whatever directory the Javascript
file is in
Expand All @@ -20,13 +20,13 @@ Client-side library for rendering webmentions from [webmention.io](https://webme
You can also pass in some arguments, for example:

```html
<script src="/path/to/webmention.js" data-id="webmention-container" async></script>
<script src="/path/to/webmention.min.js" data-id="webmention-container" async></script>
```

Note that the `async` isn't strictly necessary but it can speed up apparent page
loads.

Accepted arguments (see the source for more details):
Accepted arguments (see the source in `static/webmention.js` for more details):

* `page-url` -- use this reference URL instead of the current browser location
* `add-urls` -- additional URLs to include, separated by a `|`
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "webmention.js",
"version": "0.1.0",
"version": "0.2.0",
"description": "Client-side library for rendering webmentions from webmention.io",
"main": "index.js",
"directories": {
"test": "tests"
},
"scripts": {
"minify": "terser --compress --mangle --comments all --ecma 5 --output ./static/webmention.min.js -- ./static/webmention.js",
"minify": "terser --compress --mangle --ecma 5 --output ./static/webmention.min.js -- ./static/webmention.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand Down
5 changes: 4 additions & 1 deletion static/webmention.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* webmention.js
/** @preserve webmention.js
Simple thing for embedding webmentions from webmention.io into a page, client-side.
Expand Down Expand Up @@ -26,6 +26,9 @@ GitHub repo (for latest released versions, issue tracking, etc.):
http://github.com/PlaidWeb/webmention.js
*/

/**
Basic usage:
<script src="/path/to/webmention.js" data-param="val" ... async />
Expand Down
30 changes: 30 additions & 0 deletions static/webmention.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4104513

Please sign in to comment.