diff --git a/.eleventy.js b/.eleventy.js index 6e65019..387343d 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -10,12 +10,13 @@ module.exports = config => { let markdownIt = require("markdown-it"); let markdownItScrollable = require("markdown-it-scrolltable"); + let markdownItHeadings = require("markdown-it-github-headings"); let options = { html: true }; config.setLibrary("md", - markdownIt(options).use(markdownItScrollable)); + markdownIt(options).use(markdownItScrollable).use(markdownItHeadings)); const paths = [ 'main/assets', diff --git a/package-lock.json b/package-lock.json index 784ad8d..ba25f1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@11ty/eleventy": "^0.11.1", "@11ty/eleventy-navigation": "^0.3.2", "@11ty/eleventy-plugin-syntaxhighlight": "^3.1.1", + "markdown-it-github-headings": "^2.0.0", "markdown-it-scrolltable": "^0.1.6" } }, @@ -1547,6 +1548,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/github-slugger": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.3.0.tgz", + "integrity": "sha512-gwJScWVNhFYSRDvURk/8yhcFBee6aFjye2a7Lhb2bUyRulpIoek9p0I9Kt7PT67d/nUlZbFu8L9RLiA0woQN8Q==", + "dev": true, + "dependencies": { + "emoji-regex": ">=6.0.0 <=6.1.1" + } + }, + "node_modules/github-slugger/node_modules/emoji-regex": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-6.1.1.tgz", + "integrity": "sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4=", + "dev": true + }, "node_modules/glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -1753,6 +1769,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/html-entities": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", + "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", + "dev": true + }, "node_modules/html-escaper": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", @@ -1866,6 +1888,15 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "node_modules/innertext": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/innertext/-/innertext-1.0.3.tgz", + "integrity": "sha512-ZC410b7IbrTrmt8bQb27xUOJgXkJu+XL6MVncb9FGyxjRIHyQqNjpSDY20zvSUttkAiYj0dait/67/sXyWvwYg==", + "dev": true, + "dependencies": { + "html-entities": "^1.2.0" + } + }, "node_modules/is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", @@ -2376,6 +2407,16 @@ "markdown-it": "bin/markdown-it.js" } }, + "node_modules/markdown-it-github-headings": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-it-github-headings/-/markdown-it-github-headings-2.0.0.tgz", + "integrity": "sha512-7ET0QiS2UWCM4hZraWVT9Df0PzuTQwK//3XM1q8vtXImUCRNGwG4bapa6ToDL8M4jkPeYSMrTiTvdJqwJifC4Q==", + "dev": true, + "dependencies": { + "github-slugger": "^1.1.1", + "innertext": "^1.0.1" + } + }, "node_modules/markdown-it-scrolltable": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/markdown-it-scrolltable/-/markdown-it-scrolltable-0.1.6.tgz", @@ -5533,6 +5574,23 @@ "has-symbols": "^1.0.1" } }, + "github-slugger": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.3.0.tgz", + "integrity": "sha512-gwJScWVNhFYSRDvURk/8yhcFBee6aFjye2a7Lhb2bUyRulpIoek9p0I9Kt7PT67d/nUlZbFu8L9RLiA0woQN8Q==", + "dev": true, + "requires": { + "emoji-regex": ">=6.0.0 <=6.1.1" + }, + "dependencies": { + "emoji-regex": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-6.1.1.tgz", + "integrity": "sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4=", + "dev": true + } + } + }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -5693,6 +5751,12 @@ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, + "html-entities": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", + "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", + "dev": true + }, "html-escaper": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", @@ -5786,6 +5850,15 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "innertext": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/innertext/-/innertext-1.0.3.tgz", + "integrity": "sha512-ZC410b7IbrTrmt8bQb27xUOJgXkJu+XL6MVncb9FGyxjRIHyQqNjpSDY20zvSUttkAiYj0dait/67/sXyWvwYg==", + "dev": true, + "requires": { + "html-entities": "^1.2.0" + } + }, "is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", @@ -6185,6 +6258,16 @@ "uc.micro": "^1.0.5" } }, + "markdown-it-github-headings": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-it-github-headings/-/markdown-it-github-headings-2.0.0.tgz", + "integrity": "sha512-7ET0QiS2UWCM4hZraWVT9Df0PzuTQwK//3XM1q8vtXImUCRNGwG4bapa6ToDL8M4jkPeYSMrTiTvdJqwJifC4Q==", + "dev": true, + "requires": { + "github-slugger": "^1.1.1", + "innertext": "^1.0.1" + } + }, "markdown-it-scrolltable": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/markdown-it-scrolltable/-/markdown-it-scrolltable-0.1.6.tgz", diff --git a/package.json b/package.json index db48bbc..f60cac5 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@11ty/eleventy": "^0.11.1", "@11ty/eleventy-navigation": "^0.3.2", "@11ty/eleventy-plugin-syntaxhighlight": "^3.1.1", + "markdown-it-github-headings": "^2.0.0", "markdown-it-scrolltable": "^0.1.6" } }