MDX content support

    Some MDX content from ./src/pages/content.mdx file.

    Setup

    • Install @mdx-js/rollup
    • Set enforce: 'pre' to mdx plugin at vite.config.ts
    // vite.config.ts
     
    import { defineConfig } from 'vite'
    import react from '@vitejs/plugin-react'
    import generouted from '@generouted/react-router/plugin'
    import mdx from '@mdx-js/rollup'
     
    export default defineConfig({
      plugins: [{ enforce: 'pre', ...mdx() }, , react(), generouted()],
      resolve: { alias: { '@': '/src' } },
    })

    Adding pages

    Add the home page by creating a new file src/pages/index.mdx/:

    ### Header
     
    **Bold**, _italic_ and `inline-code`

    Preview

    Header

    Bold, italic and inline-code

    GFM

    Autolink literals

    www.example.com
    ,
    https://example.com
    , and
    [email protected]
    .

    Footnote

    A note

    1

    Strikethrough

    one or two tildes.

    Table

    abcd

    Tasklist

    • to do
    • done

    hello: frontmatter

    Footnotes

    1. Big note.