Contributing
Docsta is built with simplicity, scalability, and collaboration in mind. Whether you're fixing a typo, improving the layout, or adding new features, we welcome contributions of all sizes.
This section outlines how to set up your local environment and submit improvements to the documentation or the codebase.
1. Fork & Clone the Repository
First, fork the Docsta repository on GitHub and clone it to your machine:
git clone https://github.com/your-username/docsta.git
cd docsta2. Install Dependencies
Install all required packages using your package manager of choice:
npm install
# or
yarn installMake sure you also install dependencies in the Sanity Studio folder (if included):
cd sanity
npm install3. Set Up Environment Variables
Create a .env.local file at the root of the project with the required variables:
# .env.local
NEXT_PUBLIC_SANITY_PROJECT_ID=your_project_id
NEXT_PUBLIC_SANITY_DATASET=production
NEXT_PUBLIC_SANITY_API_VERSION=2023-01-01Refer to the Environment Variables section if you're unsure about values.
4. Run the Dev Server
Start the development server locally:
npm run devThis should spin up your Docsta instance at http://localhost:3000.
To run Sanity Studio (if editing content):
cd sanity
npm run dev5. Make Your Changes
You can contribute in various ways:
- โ Content: Edit or create
.mdxfiles in the/contentfolder - ๐จ Styling: Customize components or Tailwind config
- ๐ง Functionality: Improve or fix logic in
/components,/lib, or API calls
๐ Bug Fixes: Patch broken UI, links, or fetch logic
6. Lint & Format
Run linters to ensure your code meets the standards:
npm run lintYou can also format with Prettier:
npm run format7. Commit & Push
Follow conventional commit messages if possible:
git checkout -b fix/sidebar-bug
git add .
git commit -m "fix: resolve empty sidebar rendering issue"
git push origin fix/sidebar-bug8. Submit a Pull Request
- Go to the GitHub repo
- Open a new Pull Request from your branch
- Describe what you changed and why
Weโll review your submission as soon as possible!
9. Contributor Guidelines
โ
Be respectful and constructive
โ
Keep PRs focused and scoped
โ
Add comments or docs where needed
โ
Test your changes before submitting
10. Join the Community
Want to stay involved? Follow the project, open discussions, or suggest features via GitHub Issues.
Contributions make Docsta better for everyoneโthank you for being part of the journey ๐
๐ Next Up: Learn how to structure docs using MDX or configure advanced theming.
What did you think of this content?
It was helpful
It was not helpful
I have a feedback