Skip to content
A basic starter template for Eleventy blogs, with added support for webmentions.
Branch: master
Clone or download
Pull request Compare This branch is 19 commits ahead, 10 commits behind 11ty:master.
Latest commit 21b436f Jun 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_11ty Using deep data merge (post tag is inherited from posts/posts.json) a… Jan 11, 2019
_data get domain name from metadata Jan 17, 2019
_includes whoops, rm demo url Jun 12, 2019
about Upgrades to 0.4.0 and adds tag pages Jun 21, 2018
css add basic styling Jan 17, 2019
feed Add sitemap.xml Sep 24, 2018
img fix webmention content sanitizer, HT @zachleat Jun 12, 2019
posts Using deep data merge (post tag is inherited from posts/posts.json) a… Jan 11, 2019
.editorconfig Adds editorconfig for my own sanity. Jan 29, 2018
.eleventy.js fix webmention content sanitizer, HT @zachleat Jun 12, 2019
.eleventyignore Adds a /tags/ to list all valid tags Aug 29, 2018
.env.sample add env sample Jan 17, 2019
.gitignore add data fetching function Jan 17, 2019
.nvmrc Adds an .nvmrc for netlify deploys. Jan 25, 2018
.prettierrc update code style Jun 12, 2019
.travis.yml Change default config to use pathPrefix: "/" and then use `--pathpref… Jan 26, 2018
404.md Add link to quick tip in 404 page. Also a link to home. Jan 14, 2019
LICENSE Updated license name Jan 29, 2018
README.md add demo image Jan 17, 2019
archive.njk Refactored latest posts and with a correct sort. Uses dates on posts … Sep 30, 2018
index.njk Fix href on github pages Sep 30, 2018
netlify.toml Switch to debug for netlify deploy Jan 28, 2018
package.json update code style Jun 12, 2019
sitemap.xml.njk Add sitemap.xml Sep 24, 2018
tags-list.njk Adds a /tags/ to list all valid tags Aug 29, 2018
tags.njk Same URL pattern for relative paths that I have seen elsewhere Dec 31, 2018

README.md

eleventy-webmentions

A basic starter template for Eleventy blogs with added support for webmentions.
For more information about this, read Static Indieweb: Using Webmentions.

Example of Webmention Section

Installation

Run npm install after cloning this repository. The available commands are identical to eleventy-base-blog.

Enable Webmentions

Follow these steps to get it working:

  1. Go to https://webmention.io/ and sign in. To authenticate, you will have to include a <a rel="me"> link at your domain, pointing to your github or twitter user URL:

<a href="https://github.com/maxboeck" rel="me">Max on Github</a>

  1. Once you've verified domain ownership, go to the settings page. Copy the token listed under "API Key" there.

  2. Paste the token into the .env.sample file, then delete the .sample from the filename.

  3. Check the information in _data/metadata.json and make sure your domain name is correct. It should look like example.com.

  4. Run Eleventy. It will try to fetch the webmentions for your domain (you may not yet have any, check your webmentions.io dashboard). After the first use, a cached json file will be created so you don't have to re-fetch that data everytime eleventy regenerates the site in development.

Customization

This starter includes just the basic functionality, feel free to make it your own.
The relevant parts are:

  • Templates: _includes/webmentionlist.njk and _includes/webmention.njk
  • Filter: webmentionsForUrl in .eleventy.js
  • Data Fetching: _data/webmentions.js
  • Basic Styling: css/webmentions.css
You can’t perform that action at this time.