tutorial toc
This commit is contained in:
parent
ae81f6d573
commit
c643f10530
10 changed files with 5257 additions and 183 deletions
|
|
@ -1,14 +1,19 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import mdx from 'vite-plugin-mdx';
|
||||
import _mdx from 'vite-plugin-mdx';
|
||||
import remarkToc from 'remark-toc';
|
||||
import rehypeSlug from 'rehype-slug';
|
||||
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
|
||||
|
||||
const mdx = _mdx.default || _mdx;
|
||||
// `options` are passed to `@mdx-js/mdx`
|
||||
const options = {
|
||||
// See https://mdxjs.com/advanced/plugins
|
||||
remarkPlugins: [
|
||||
remarkToc,
|
||||
// E.g. `remark-frontmatter`
|
||||
],
|
||||
rehypePlugins: [],
|
||||
rehypePlugins: [rehypeSlug, rehypeAutolinkHeadings],
|
||||
};
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue