Mixin and this documentation are open source. We are now welcoming contributors to collaborate on these.
Mixin developer documentation is based on Docusaurus, a static site generator for React.js.
- You need to ensure that you have Yarn installed
- Clone the repository of the document
yarnin the root of the
yarn startto preview the documentation
The documentation is organized in the following way:
- all source is in the
docsdirectory contains the following subdirectories:
apicontains all the API documentation
dappcontains all the DApp introduction, tutorials, guides
mainnetcontains all the mainnet documentation
communitycontains all the community documentation
examplescontains all the examples
sidebar.docs.js file contains the sidebar of the documentation, which is separated into 2 sections: 'Docs' and 'API'.
All content is written in Markdown format with react components extension.
The first step to contribute is to create a new markdown file at the right place in the
For example, this document is in
If you are writing new content for specific topics, you can put them in the existed files:
Articles- for articles, please update the
Showcases- for showcases, follow the 2 steps below:
- Add the information of showcase at
src/data/users.tsxin alphabetical order.
- Put a screenshot at
- Add the information of showcase at
There are some built-in components that can be used in the documentation in the directory
<APIEndpoint>is a component that renders an API endpoint
<APIMetaPanel>is a component that renders an API's information including the authorizations and limitation
<APIParams>is a component that renders an API's parameters
<APIPayload>is a component that renders an API's payload
<APIRequest>is a component that renders an API's request
Please refer to the any document of 'API' section for the usage of them.
There are code snipples that can be used in the documentation in the directory
docs/partials. Please consider using them.
After you have created a new markdown file, you need to add it to the sidebar.
The sidebar file is
sidebar.docs.js and it is located in the
If you are adding a new documentation, you need to put a translation file at
For example, this document is
docs/community/contributing.mdx and its
zh-CN translation is
If you're the maintainer of this project, please follow the instructions in the i18n tutorial to add a new language.
Translate the index page
Please follow the instructions here to translate your index page and react components.
Generate/Update json files
yarn run write-translations --locale $LANG_CODE
$LANG_CODE is the language code of the language you want to generate. For example, if you want to generate the translation files for the French language, you should use
The translation files are generated in the
Generate Markdown files
Copy the docs Markdown files to
i18n/$LANG_CODE/docusaurus-plugin-content-docs/current, and translate them:
mkdir -p i18n/$LANG_CODE/docusaurus-plugin-content-docs/currentcp -r docs/** i18n/$LANG_CODE/docusaurus-plugin-content-docs/current
All the documents are placed in the
i18n/$LANG_CODE/ according to the languages.
i18n/$LANG_CODE/code.json: the translation of the index page and the text used by docusaurus.
i18n/$LANG_CODE/docusaurus-theme-classic/footer.json: the translation of footer.
i18n/$LANG_CODE/docusaurus-theme-classic/navbar.json: the translation of navbar.
i18n/$LANG_CODE/docusaurus-plugin-content-docs/current.json: the label of category on sidebar.
i18n/$LANG_CODE/docusaurus-plugin-content-docs/current/**: the markdown files of documents.
Preview the translation
yarn run start --locale $LANG_CODE
To participate in Mixin development, search
7000104112 in Mixin Messenger and join the developer group.