1
- import { s } from 'hastscript' ;
2
- import rehypeAutolinkHeadings from 'rehype-autolink-headings' ;
3
1
import rehypePresetMinify from 'rehype-preset-minify' ;
4
2
import rehypePrismPlus from 'rehype-prism-plus' ;
5
3
// Rehype packages
@@ -8,7 +6,6 @@ import rehypeSlug from 'rehype-slug';
8
6
// Remark packages
9
7
import remarkComponentSpacing from './remark-component-spacing' ;
10
8
import remarkExtractFrontmatter from './remark-extract-frontmatter' ;
11
- import remarkTocHeadings from './remark-toc-headings' ;
12
9
13
10
export const mdxOptions = { } ;
14
11
// this is the recommended way to add custom remark/rehype plugins:
@@ -17,38 +14,11 @@ export const mdxOptions = {};
17
14
mdxOptions . remarkPlugins = [
18
15
...( mdxOptions . remarkPlugins ?? [ ] ) ,
19
16
remarkExtractFrontmatter ,
20
- [ remarkTocHeadings ] ,
21
17
remarkComponentSpacing ,
22
18
] ;
23
19
mdxOptions . rehypePlugins = [
24
20
...( mdxOptions . rehypePlugins ?? [ ] ) ,
25
21
rehypeSlug ,
26
- [
27
- rehypeAutolinkHeadings ,
28
- {
29
- behavior : 'wrap' ,
30
- properties : {
31
- ariaHidden : true ,
32
- tabIndex : - 1 ,
33
- className : 'autolink-heading' ,
34
- } ,
35
- content : [
36
- s (
37
- 'svg.anchor.before' ,
38
- {
39
- xmlns : 'http://www.w3.org/2000/svg' ,
40
- width : 16 ,
41
- height : 16 ,
42
- fill : 'currentColor' ,
43
- viewBox : '0 0 24 24' ,
44
- } ,
45
- s ( 'path' , {
46
- d : 'M9.199 13.599a5.99 5.99 0 0 0 3.949 2.345 5.987 5.987 0 0 0 5.105-1.702l2.995-2.994a5.992 5.992 0 0 0 1.695-4.285 5.976 5.976 0 0 0-1.831-4.211 5.99 5.99 0 0 0-6.431-1.242 6.003 6.003 0 0 0-1.905 1.24l-1.731 1.721a.999.999 0 1 0 1.41 1.418l1.709-1.699a3.985 3.985 0 0 1 2.761-1.123 3.975 3.975 0 0 1 2.799 1.122 3.997 3.997 0 0 1 .111 5.644l-3.005 3.006a3.982 3.982 0 0 1-3.395 1.126 3.987 3.987 0 0 1-2.632-1.563A1 1 0 0 0 9.201 13.6zm5.602-3.198a5.99 5.99 0 0 0-3.949-2.345 5.987 5.987 0 0 0-5.105 1.702l-2.995 2.994a5.992 5.992 0 0 0-1.695 4.285 5.976 5.976 0 0 0 1.831 4.211 5.99 5.99 0 0 0 6.431 1.242 6.003 6.003 0 0 0 1.905-1.24l1.723-1.723a.999.999 0 1 0-1.414-1.414L9.836 19.81a3.985 3.985 0 0 1-2.761 1.123 3.975 3.975 0 0 1-2.799-1.122 3.997 3.997 0 0 1-.111-5.644l3.005-3.006a3.982 3.982 0 0 1 3.395-1.126 3.987 3.987 0 0 1 2.632 1.563 1 1 0 0 0 1.602-1.198z' ,
47
- } )
48
- ) ,
49
- ] ,
50
- } ,
51
- ] ,
52
22
[ rehypePrismPlus , { ignoreMissing : true } ] ,
53
23
rehypePresetMinify ,
54
24
] ;
0 commit comments