tutorial toc

This commit is contained in:
Felix Roos 2022-05-19 17:16:28 +02:00
parent ae81f6d573
commit c643f10530
10 changed files with 5257 additions and 183 deletions

View file

@ -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/