Skip to content

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@next
sh
pnpm add -D vitepress@next
sh
yarn add -D vitepress@next vue
sh
bun add -D vitepress@next

4. Add Youw Code Exampwe nya~

4.1 Cweate the exampwe fiwe

  1. Cweate a new fiwe in /docs/examples named aftew the pwogwamming wanguage.
  2. The fiwename must end with .md.
  3. Incwude at weast two diffewent ways to make API cawws >w<.

4.2 Add the exampwe to the sidebaw

  1. Open /docs/.vitepress/config.mts.
  2. Wocate the "Code Examples" secwion in the sidebaw.
  3. Add youw new fiwe to the wist.
  4. 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 dev
sh
pnpm run dev
sh
yarn dev
sh
bun run dev

6. Cweate a Puww Weqwest nya~

Submit a puww weqwest to the owiginaw wepositowy >w< !