This is an automated email from the ASF dual-hosted git repository. msahyoun pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pdfbox-docs.git
commit 2aec28e89980bb50173a357d8cff83eb69792aec Author: Maruan Sahyoun <sahy...@fileaffairs.de> AuthorDate: Wed Jun 10 08:05:12 2020 +0200 PDFBOX-4848: enable generation of anchor tags in headings --- .eleventy.js | 7 +++++++ package.json | 1 + 2 files changed, 8 insertions(+) diff --git a/.eleventy.js b/.eleventy.js index 9d36c8c..60afdd0 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,5 +1,12 @@ module.exports = function(eleventyConfig) { + // enable generation of header anchor tags + // needs the markdown-it-anchor plugin + const markdownIt = require("markdown-it"); + const markdownItAnchor = require("markdown-it-anchor"); + const markdownLib = markdownIt().use(markdownItAnchor); + eleventyConfig.setLibrary("md", markdownLib); + // copy static files to output eleventyConfig.addPassthroughCopy("./content/bootstrap"); eleventyConfig.addPassthroughCopy("./content/css/*.css"); diff --git a/package.json b/package.json index 3ab48fc..7e91046 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@11ty/eleventy": "^0.11.0", "html-validate": "^2.23.0", + "markdown-it-anchor": "^5.3.0", "npm-run-all": "^4.1.5" } }