feat: ✨ Anchor links
parent
7c09ecb43f
commit
897ad020c6
|
@ -1,4 +1,5 @@
|
|||
FROM node:lts
|
||||
FROM node:16-bookworm
|
||||
RUN apt-get update && apt-get install -y libvips-dev libc6
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
|
|
@ -79,9 +79,16 @@ main {
|
|||
font-family: 'RobotoMono', monospace;
|
||||
}
|
||||
main, h1, h2, h3, h4, h5, h6, pre, ul, ol, p, table, input, button {
|
||||
background-color: rgba(2,2,2,.75);
|
||||
background-color: rgba(2,2,2,.35);
|
||||
box-shadow: 0 0 calc(.5vh + .5vw) calc(.5vh + .5vw) rgba(2,2,2,.75);
|
||||
}
|
||||
.header-anchor {
|
||||
text-decoration: none;
|
||||
color: rgba(255,255,255,.75);
|
||||
}
|
||||
.header-anchor:hover {
|
||||
color: rgba(255,255,255,1)
|
||||
}
|
||||
input, button {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
|
|
|
@ -88,16 +88,16 @@ module.exports = function(eleventyConfig) {
|
|||
})
|
||||
|
||||
// Customize Markdown library and settings:
|
||||
let markdownLibrary = markdownIt({
|
||||
html: true,
|
||||
breaks: true,
|
||||
linkify: true
|
||||
})//.use(markdownItAnchor, {
|
||||
// permalink: true,
|
||||
// permalinkClass: "direct-link",
|
||||
// permalinkSymbol: "#"
|
||||
// })
|
||||
eleventyConfig.setLibrary("md", markdownLibrary)
|
||||
eleventyConfig.setLibrary("md", markdownIt({
|
||||
html: true,
|
||||
breaks: true,
|
||||
linkify: true,
|
||||
}).use(markdownItAnchor, {
|
||||
permalink: markdownItAnchor.permalink.headerLink(),
|
||||
level: [2, 3, 4, 5, 6],
|
||||
slugify: eleventyConfig.getFilter('slugify'),
|
||||
tabIndex: false,
|
||||
}))
|
||||
|
||||
// Override Browsersync defaults (used only with --serve)
|
||||
eleventyConfig.setBrowserSyncConfig({
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0",
|
||||
"luxon": "^1.28.1",
|
||||
"markdown-it": "^12.0.4",
|
||||
"markdown-it-anchor": "^7.1.0"
|
||||
"markdown-it-anchor": "^8.6.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@11ty/dependency-tree": {
|
||||
|
@ -399,6 +399,31 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/linkify-it": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.4.tgz",
|
||||
"integrity": "sha512-hPpIeeHb/2UuCw06kSNAOVWgehBLXEo0/fUs0mw3W2qhqX89PI2yvok83MnuctYGCPrabGIoi0fFso4DQ+sNUQ==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/markdown-it": {
|
||||
"version": "13.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-13.0.4.tgz",
|
||||
"integrity": "sha512-FAIUdEXrCDnQmAAmJC+UeW/3p0eCI4QZ/+W0lX/h83VD3v78IgTFYftjnAeXS8H0g4PFQCgipc51cQDA8tjgLw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/linkify-it": "*",
|
||||
"@types/mdurl": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/mdurl": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.4.tgz",
|
||||
"integrity": "sha512-ARVxjAEX5TARFRzpDRVC6cEk0hUIXCCwaMhz8y7S1/PxU6zZS1UMjyobz7q4w/D/R552r4++EhwmXK1N2rAy0A==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",
|
||||
|
@ -1860,11 +1885,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/markdown-it-anchor": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-7.1.0.tgz",
|
||||
"integrity": "sha512-loQggrwsIkkP7TOrESvmYkV2ikbQNNKhHcWyqC7/C2CmfHl1tkUizJJU8C5aGgg7J6oXVQJx17gk7i47tNn/lQ==",
|
||||
"version": "8.6.7",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz",
|
||||
"integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==",
|
||||
"dev": true,
|
||||
"peerDependencies": {
|
||||
"@types/markdown-it": "*",
|
||||
"markdown-it": "*"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -18,6 +18,6 @@
|
|||
"@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0",
|
||||
"luxon": "^1.28.1",
|
||||
"markdown-it": "^12.0.4",
|
||||
"markdown-it-anchor": "^7.1.0"
|
||||
"markdown-it-anchor": "^8.6.7"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue