Skip to content

Commit

Permalink
config(build): 🔧 use rehype-toc after rehype-slug
Browse files Browse the repository at this point in the history
  • Loading branch information
vanntile committed Apr 14, 2023
1 parent 8409e5a commit 8745a2f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import markdoc from '@astrojs/markdoc'
import mdx from '@astrojs/mdx'
import tailwind from '@astrojs/tailwind'
import rehypeToc from '@jsdevtools/rehype-toc'
import { defineConfig } from 'astro/config'
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
import rehypePrettyCode from 'rehype-pretty-code'
import rehypeSlug from 'rehype-slug'
import rehypeSortAttributes from 'rehype-sort-attributes'
import rehypeToc from 'rehype-toc'
import remarkHint from 'remark-hint'
import { getHighlighter } from 'shiki'
import {
Expand Down Expand Up @@ -55,17 +55,6 @@ export default defineConfig({
rehypePlugins: [
[rehypePrettyCode, prettyCodeOptions],
[rehypePrettyCodeStyleToClass, { stylesMap: [['font-style: italic', 'italic']] }],
[
rehypeToc,
{
nav: false,
cssClasses: {
list: '',
listItem: '',
link: '',
},
},
],
rehypeSlug,
[
rehypeAutolinkHeadings,
Expand All @@ -78,6 +67,7 @@ export default defineConfig({
},
},
],
[rehypeToc, { nav: false, cssClasses: { list: '', listItem: '', link: '' } }],
rehypeSortAttributes,
],
},
Expand Down

0 comments on commit 8745a2f

Please sign in to comment.