File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ require ( 'dotenv' ) . config ( ) ;
2+ const Webmentions = require ( "eleventy-plugin-webmentions" ) ;
13const pluginRss = require ( "@11ty/eleventy-plugin-rss" ) ;
24const htmlmin = require ( "html-minifier" ) ;
35
46module . exports = function ( eleventyConfig ) {
57 // 11ty plugins
68 eleventyConfig . addPlugin ( pluginRss ) ;
9+ eleventyConfig . addPlugin ( Webmentions , {
10+ domain : "benkutil.com" ,
11+ token : process . env . WEBMENTIONS_TOKEN
12+ } ) ;
713
814 // run these configs in production only
915 if ( process . env . ELEVENTY_ENV === 'production' ) {
Original file line number Diff line number Diff line change 1+ ELEVENTY_ENV = environment
2+ WEBMENTIONS_TOKEN = yourWebmentionTokenHere
Original file line number Diff line number Diff line change 1+ .env
12node_modules
23package-lock.json
34_site
5+ _webmentioncache
Original file line number Diff line number Diff line change 2222 "devDependencies" : {
2323 "@11ty/eleventy" : " ^2.0.0-beta.3" ,
2424 "@11ty/eleventy-plugin-rss" : " ^1.2.0" ,
25+ "eleventy-plugin-webmentions" : " ^2.0.0" ,
2526 "html-minifier" : " ^4.0.0"
2627 },
2728 "dependencies" : {
28- "@11ty/eleventy-upgrade-help" : " ^2.0.5"
29+ "@11ty/eleventy-upgrade-help" : " ^2.0.5" ,
30+ "dotenv" : " ^16.0.3"
2931 }
3032}
Original file line number Diff line number Diff line change 1313
1414 <link rel =" canonical" href =" {{ page.url | absoluteUrl(siteData.url) }}" >
1515 <link rel =" alternate" type =" application/rss+xml" title =" {{ siteData.title | safe }}" href =" {{ '/feed.xml' | absoluteUrl(siteData.url) }}" >
16+
17+ <link rel =" webmention" href =" https://webmention.io/benkutil.com/webmention" />
18+ <link rel =" pingback" href =" https://webmention.io/benkutil.com/xmlrpc" />
19+
1620 <style type =" text/css" >
1721 html { margin : 0 ; padding : 0 ; text-align : center ; }
1822 body {
Original file line number Diff line number Diff line change 22layout: layouts/base.njk
33templateClass: tmpl-content
44---
5- {{ content | safe }}
5+ {{ content | safe }}
6+ {%- set currentPostMentions = webmentions | webmentionsForPage -%}
You can’t perform that action at this time.
0 commit comments