Skip to content

Commit

Permalink
eleventy 3.0.0-alpha.17, IdAttributePlugin, eleventeen.png (#39)
Browse files Browse the repository at this point in the history
- use new IdAttributePlugin, makes “use of the existing posthtml
  infrastructure used by the HTML base plugin and the input path to URL
  plugins to add” slugified `id` attrs.
  Has the added benefit of removing the unnecessary link markup from your
  RSS feeds too!
  11ty/eleventy#3363
- rm markdownItAnchor and comment out header-anchor css
- eleventeen.png instead of eight-million.jpg in thirdpost.md
- upd eleventy + eleventy-plugin-rss

9.2.20-alpha.17
  • Loading branch information
rdela authored Jul 21, 2024
1 parent 2bc0394 commit 70de112
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 25 deletions.
8 changes: 4 additions & 4 deletions content/archive/thirdpost.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
title: This is my third post.
description: This is a post on My Blog about win-win survival strategies.
date: 2018-08-24
hero: https://raw.githubusercontent.com/11ty/11ty-website/a394cc007a0fb752fc65abef26b238c64c4134af/src/blog/eight-million.jpg
heroalt: Zach pointing to the new balloons in his office that say 8 Million
herocaption: Eight Million Eleventy npm Downloads!
herolink: https://www.11ty.dev/blog/eight-million/
hero: https://o.famebot.com/file/famebot/eleventeen.png
heroalt: screenshot
herocaption: latest eleventeen
herolink: /about/
tags:
- second tag
- posts with two tags
Expand Down
17 changes: 2 additions & 15 deletions eleventy.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DateTime } from "luxon";
import markdownItAnchor from "markdown-it-anchor";
import { IdAttributePlugin } from "@11ty/eleventy";
import pluginRss from "@11ty/eleventy-plugin-rss";
import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
import pluginBundle from "@11ty/eleventy-plugin-bundle";
Expand Down Expand Up @@ -29,6 +29,7 @@ export default async function(eleventyConfig) {

// Official plugins
eleventyConfig.addPlugin(pluginRss);
eleventyConfig.addPlugin(IdAttributePlugin);
eleventyConfig.addPlugin(pluginSyntaxHighlight, {
preAttributes: { tabindex: 0 },
});
Expand Down Expand Up @@ -81,20 +82,6 @@ export default async function(eleventyConfig) {
);
});

// Customize Markdown library settings:
eleventyConfig.amendLibrary("md", (mdLib) => {
mdLib.use(markdownItAnchor, {
permalink: markdownItAnchor.permalink.ariaHidden({
placement: "after",
class: "header-anchor",
symbol: "#",
ariaHidden: false,
}),
level: [1, 2, 3, 4],
slugify: eleventyConfig.getFilter("slugify"),
});
});

eleventyConfig.addShortcode("currentBuildDate", () => {
return (new Date()).toISOString();
})
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eleventeen",
"version": "9.2.19-alpha.16",
"version": "9.2.20-alpha.17",
"description": "Starter repository for a website built with Eleventy + eleventeen",
"type": "module",
"scripts": {
Expand Down Expand Up @@ -39,14 +39,13 @@
},
"homepage": "https://eleventeen.blog/about/",
"devDependencies": {
"@11ty/eleventy": "3.0.0-alpha.16",
"@11ty/eleventy": "3.0.0-alpha.17",
"@11ty/eleventy-img": "^4.0.2",
"@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-bundle": "^2.0.2",
"@11ty/eleventy-plugin-rss": "^2.0.1",
"@11ty/eleventy-plugin-rss": "^2.0.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"@famebot/chromagen": "^1.0.1",
"luxon": "^3.4.4",
"markdown-it-anchor": "^9.0.1"
"luxon": "^3.4.4"
}
}
3 changes: 2 additions & 1 deletion public/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ header {
margin-inline-end: 1em;
}

/* Direct Links / Markdown Headers */
/* Direct Links / Markdown Headers
.header-anchor {
text-decoration: none;
font-style: normal;
Expand All @@ -462,3 +462,4 @@ a.header-anchor:focus,
h2 + .header-anchor {
font-size: 1.5em;
}
*/

0 comments on commit 70de112

Please sign in to comment.