Adds markdown-it-anchor plugin

This commit is contained in:
Zach Leatherman 2018-06-18 09:00:00 -05:00
parent 5115c4409c
commit 4185f33c15
6 changed files with 45 additions and 1 deletions

View File

@ -22,6 +22,24 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy("img");
eleventyConfig.addPassthroughCopy("css");
/* Markdown Plugins */
let markdownIt = require("markdown-it");
let markdownItAnchor = require("markdown-it-anchor");
let options = {
html: true,
breaks: true,
linkify: true
};
let opts = {
permalink: true,
permalinkClass: "direct-link",
permalinkSymbol: "#"
};
eleventyConfig.setLibrary("md", markdownIt(options)
.use(markdownItAnchor, opts)
);
return {
templateFormats: [
"md",

View File

@ -183,3 +183,21 @@ a[href].tag:visited {
.warning ol:only-child {
margin: 0;
}
/* Direct Links / Markdown Headers */
.direct-link {
font-family: sans-serif;
text-decoration: none;
font-style: normal;
margin-left: .1em;
}
a[href].direct-link,
a[href].direct-link:visited {
color: transparent;
}
a[href].direct-link:focus,
a[href].direct-link:focus:visited,
:hover > a[href].direct-link,
:hover > a[href].direct-link:visited {
color: #aaa;
}

View File

@ -25,6 +25,8 @@
"@11ty/eleventy": "^0.3.6",
"@11ty/eleventy-plugin-rss": "^1.0.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^1.0.5",
"luxon": "^1.0.0"
"luxon": "^1.0.0",
"markdown-it": "^8.4.1",
"markdown-it-anchor": "^4.0.0"
}
}

View File

@ -9,6 +9,8 @@ Leverage agile frameworks to provide a robust synopsis for high level overviews.
Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.
## Section Header
Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line.
``` text/2-3

View File

@ -7,6 +7,8 @@ layout: layouts/post.njk
---
Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.
## Section Header
<a href="{{ '/posts/firstpost/' | url }}">First post</a>
<a href="{{ '/posts/thirdpost/' | url }}">Third post</a>

View File

@ -17,4 +17,6 @@ function myCommand() {
Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.
## Section Header
Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line.