This website is built using Docusaurus, a modern static website generator. It serves as the primary documentation and wiki for open.mp and SA-MP.
- Docs Source: All documentation pages are located in
docs/. They are written in Markdown (.md) or MDX (.mdx). - Translations: Localized content is stored in
i18n/. Each language has its own subdirectory (e.g.,i18n/es/for Spanish). - Static Assets: Images and other static files used in docs are in
static/images/.
We welcome contributions to our documentation! Whether you're fixing a typo or adding a new guide, your help is appreciated.
To preview your changes locally:
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm start
The site will be available at
http://localhost:3000. Most changes to Markdown files will live-reload in the browser.npm start -- --locale pt-BR # http://localhost:3000/pt-BR/ npm start -- --locale zh-CN # http://localhost:3000/zh-CN/
startaccepts a single locale — a second--localeis silently ignored (the last one wins) — so run one dev server per language on different ports.
-
To edit an existing page, find the corresponding
.mdfile indocs/and make your changes. -
To add a new page, create a new
.mdfile in the appropriate subdirectory ofdocs/. -
Remember to update the metadata (front matter) at the top of the file:
--- title: Page Title sidebar_label: Sidebar Label description: Brief description of the page. ---
For a detailed guide on our documentation standards and the "Edit this page" workflow, please refer to the Contributing Guide.
npm inpm start # default locale
npm start -- --locale pt-BR # specific localenpm run build # all locales
npm run build -- --locale pt-BR # one locale
npm run build -- --locale en --locale pt-BR --locale zh-CN # several localesThis command generates static content into the build directory.
npm run serveUsing SSH:
$ USE_SSH=true npm run deploy
Not using SSH:
$ GIT_USER=<Your GitHub username> npm run deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.