Let's discover in less than 5 minutes.
-
Required: Install Node.js version 16.14 or above (which can be checked by running node -v).
-
Optional: Install vscode plugin 'Markdown Snippets for MDX and Docusaurus'.
https://marketplace.visualstudio.com/items?itemName=MisterMunchkin.simple-markdown-snippets
cd /path/to/website
npm install
npm run start
By default, a browser window will open at http://localhost:3000. Browse around the site to see what's available. The default locale is en-us;
Start your site on the simplified chinese locale:
npm run start -- --locale zh
Your localized site is accessible at http://localhost:3000/zh/
In development, you can only use one locale at a same time.
create folder or .md file.
Build your site for a specific locale:
npm run build -- --locale zh
Or build your site to include all the locales at once:
npm run build
and the contents will be generated within the /build directory.