Welcome to Astar Documentation GitHub Repository! ποΈ
This website is built using Docusaurus, a modern static website generator.
Before you begin, make sure the following tools are installed on your system:
You can verify your installations by running:
git --version
node --version
yarn --versionChoose your contribution path based on whether you are a member of the Astar Collective Github Organization or an external contributor:
Organization Contributors (Astar Collective)
If you are part of the Astar organization on GitHub and have write access to the repository, follow these steps:
Clone the repository and navigate to it:
git clone https://github.com/astarnetwork/astar-docs
cd astar-docsEnsure you are on the main branch and have the latest version:
git checkout main
git pullCreate a new feature branch for your changes:
git checkout -b feat/your-feature-nameInstall dependencies using yarn:
yarn installπ‘ TIP: Use descriptive branch names like feat/update-tokenomics or fix/broken-links.
Start the local development server to preview your changes in real-time:
yarn startThis command will launch a local server (typically at http://localhost:3000) where you can see your changes as you edit the documentation.
Make your edits to the documentation files. You should be familiar with:
- Markdown basics: titles, subtitles, lists, hyperlinks, code blocks
- File structure: understanding where different documentation sections are located
Before committing, ensure the documentation builds without errors:
yarn buildIf the build completes successfully, you are ready to commit your changes.
Add your changes and create a commit with a descriptive message:
git add .
git commit -m "Description of your changes"Push your branch to GitHub:
git push -u origin feat/your-feature-nameπ‘ TIP: If you need to temporarily save your work without committing, use git stash and later restore with git stash pop.
- Go to https://github.com/astarnetwork/astar-docs
- Create a new Pull Request from your feature branch to
main - Provide a detailed description of your changes
- Once the PR is created, CI/CD will automatically generate a unique staging link for review
- You can monitor the build progress in the Actions tab on GitHub
- Wait for feedback from the team
External Contributors (Community Members)
If you are not part of the Astar organization on GitHub, you will need to fork the repository first before making contributions.
- Go to https://github.com/astarnetwork/astar-docs
- Click the Fork button in the top-right corner
- This creates a copy of the repository under your GitHub account
Clone your forked repository (replace YOUR-USERNAME with your GitHub username):
git clone https://github.com/YOUR-USERNAME/astar-docs
cd astar-docsAdd the original repository as an upstream remote to keep your fork synchronized:
git remote add upstream https://github.com/astarnetwork/astar-docsEnsure you have the latest changes from the original repository:
git checkout main
git pull upstream mainCreate a new feature branch for your changes:
git checkout -b feat/your-feature-nameInstall dependencies using yarn:
yarn installStart the local development server to preview your changes in real-time:
yarn startThis command will launch a local server (typically at http://localhost:3000) where you can see your changes as you edit the documentation.
Make your edits to the documentation files. You should be familiar with:
- Markdown basics: titles, subtitles, lists, hyperlinks, code blocks
- File structure: understanding where different documentation sections are located
Before committing, ensure the documentation builds without errors:
yarn buildIf the build completes successfully, you are ready to commit your changes.
Add your changes and create a commit with a descriptive message:
git add .
git commit -m "Description of your changes"Push your branch to your forked repository:
git push -u origin feat/your-feature-name- Go to your forked repository on GitHub (https://github.com/YOUR-USERNAME/astar-docs)
- Click Compare & pull request
- Ensure the base repository is
astarnetwork/astar-docsand the base branch ismain - Provide a detailed description of your changes
- Submit the Pull Request
- Once the PR is created, CI/CD will automatically generate a unique staging link for review
- You can monitor the build progress in the Actions tab on GitHub
- Wait for feedback from the Astar team
To keep your fork synchronized with the original repository:
git checkout main
git pull upstream main
git push origin mainPlease import and use the <Figure/> tag instead of ![image] as this enables smoother translation of docs to other languages (automatic reference to original images, no need to copy images to translated subfolders) and automatically applies some styling such as line breaks.
π§π»βπ» Example as seen here.
Top of file:
import Figure from "/src/components/figure"Within the file:
<Figure caption="Tokenomics Model" src={require('/docs/about/token-economics/img/tokenomics_1.png').default } width="100%" />Important: Please use absolute path to image (e.g. /docs/about/token-economics/img/tokenomics_1.png instead of img/tokenomics_1.png).
Likely, a broken build got pushed to main somehow. Remove the commit from main and force push to main, reopen PR in a new PR.
For Organization Contributors Only:
When a PR is ready for merge, click the button at the bottom saying Merge and Close and then Confirm.
After a few minutes you should see your changes updated on the production site at Astar Network Documentation.