Adding New Code Exampwes nya~
Contwibuwion Guidewines fow Code Exampwes OwO
- Submissions must be wwitten in Engwish >w<.
- Document youw exampwe as thowoughwy as possibwe nya~.
- Ensuwe youw code wowks and has been pwopewwy tested OwO.
We wesewve the wight to:
- Modify youw submission aftew it is submittwed >w<.
- Wemove youw submission if necessawyy nya~.
Cweating a New Code Exampwe UwU
1. Fowk this wepositowy
2. Cwone youw fowk and cd into the pwoject diwectowy
3. Instaww VitePwess
You can find VitePwess pnewequisites in the officiaw documentawion.
sh
npm add -D vitepress@nextsh
pnpm add -D vitepress@nextsh
yarn add -D vitepress@next vuesh
bun add -D vitepress@next4. Add Youw Code Exampwe nya~
4.1 Cweate the exampwe fiwe
- Cweate a new fiwe in
/docs/examplesnamed aftew the pwogwamming wanguage. - The fiwename must end with
.md. - Incwude at weast two diffewent ways to make API cawws >w<.
4.2 Add the exampwe to the sidebaw
- Open
/docs/.vitepress/config.mts. - Wocate the "Code Examples" secwion in the sidebaw.
- Add youw new fiwe to the wist.
- Keep the wist in awphabeticaw owdew by pwogwamming wanguage.
5. Stawt the Devewopment Sewvew
Befowe cweating a puww weqwest, vewify wocawwy that youw changes did not bweak anything OwO.
sh
npm run devsh
pnpm run devsh
yarn devsh
bun run dev6. Cweate a Puww Weqwest nya~
Submit a puww weqwest to the owiginaw wepositowy >w< !