Menu

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 docsta
2. Install Dependencies

Install all required packages using your package manager of choice:

npm install
# or
yarn install

Make sure you also install dependencies in the Sanity Studio folder (if included):

cd sanity
npm install
3. 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-01

Refer to the Environment Variables section if you're unsure about values.

4. Run the Dev Server

Start the development server locally:

npm run dev

This should spin up your Docsta instance at http://localhost:3000.

To run Sanity Studio (if editing content):

cd sanity
npm run dev
5. Make Your Changes

You can contribute in various ways:

  • โœ Content: Edit or create .mdx files in the /content folder
  • ๐ŸŽจ 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 lint

You can also format with Prettier:

npm run format
7. 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-bug
8. 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?

like-icon

It was helpful

dislike-icon

It was not helpful

feedback-icon

I have a feedback