Skip to content

Commit ed07ef0

Browse files
committed
Header permalinks
1 parent 7d1fd8a commit ed07ef0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

website/.eleventy.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ module.exports = function (eleventyConfig) {
2222
const markdownLib = markdownIt(options).disable('code');
2323
markdownLib.use(require('markdown-it-anchor'), {
2424
level: 2,
25+
permalink: true,
26+
permalinkSymbol: '#',
27+
permalinkClass: 'header-anchor ml-1 text-gray-300 hover:text-black',
2528
});
2629

2730
markdownLib.use(require('markdown-it-footnote'));

website/src/app.pcss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@
7777
@apply no-underline;
7878
}
7979

80+
.content a.header-anchor {
81+
@apply no-underline;
82+
}
83+
8084
.content pre {
8185
@apply mb-4 max-w-full overflow-x-auto;
8286
tab-size: 4;

0 commit comments

Comments
 (0)