GithubHelp home page GithubHelp logo

fupete / eleventy-webmentions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maxboeck/eleventy-webmentions

0.0 1.0 0.0 19.97 MB

A basic starter template for Eleventy blogs, with added support for webmentions.

License: MIT License

JavaScript 34.70% CSS 29.66% HTML 35.64%

eleventy-webmentions's Introduction

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. That's a secret key, so this file should be in your .gitignore. If you are hosting your site on Netlify, make sure to enter the token in your build settings.

  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

eleventy-webmentions's People

Contributors

zachleat avatar maxboeck avatar mathiasbynens avatar nhoizey avatar denmch avatar kitt avatar onezerodigits avatar nilsmielke avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.