astro.config.mjs 451 B

12345678910111213141516
  1. import { defineConfig } from 'astro/config';
  2. import addClasses from './add-classes.mjs';
  3. // https://astro.build/config
  4. export default defineConfig({
  5. // Enable Custom Markdown options, plugins, etc.
  6. markdown: {
  7. remarkPlugins: ['remark-code-titles'],
  8. rehypePlugins: [
  9. 'rehype-slug',
  10. ['rehype-autolink-headings', { behavior: 'prepend' }],
  11. ['rehype-toc', { headings: ['h2', 'h3'] }],
  12. [addClasses, { 'h1,h2,h3': 'title' }],
  13. ],
  14. },
  15. });