Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 745 Bytes

File metadata and controls

38 lines (25 loc) · 745 Bytes

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.vite()],
  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