First, thank you for considering contributing to docsify! It's people like you that make the open source community such a great community! 😊
We welcome any type of contribution, not only code. You can help with
- QA: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
- Marketing: writing blog posts, howto's, printing stickers, ...
- Community: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
- Code: take a look at the open issues. Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
- Money: we welcome financial contributions in full transparency on our open collective.
Working on your first Pull Request? You can learn how from this free series, How to Contribute to an Open Source Project on GitHub.
After cloning the project, run the following in your terminal
npm install
npm run build
npx serve .The third command will output a URL like http://localhost:5000. Open it in your browser, then you'll see a directory listing. Click on the docs/ folder and you'll then see the Docsify documentation (built with Docsify of course!) running locally on your computer.
Any time you change the code, you can re-run npm run build to compile the code again, then refresh your browser to see the new changes.
TO make things more streamlined, run
npm run devin a separate terminal from where you are running npx serve . and it will enter watch mode, so any time you modify the code it will automatically re-build without you having to manually run npm run build each time.
As you make changes to the code, also update the test files in the test/unit/ folder for unit tests. If needed also update the end-to-end integration tests in cypress/integration/.
Sometimes the fake DOM APIs that are available in the unit tests (thanks to JSDOM) are enough to test your code, but in other cases you might want to use real DOM APIs in which case you can use the integration testing for this (runs your code in an actual browser environment instead of Node.js). Integration tests are also useful for taking snapshots of the website to ensure that the pixels look as expected.
Once you're happy with your code changes, the changes can be submitted back to the project as a pull request. The pull request description should explain what the changes do. There will be a template to fill out when you create a pull request.
The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge. It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
We also welcome financial contributions in full transparency on our open collective. Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
If you have any questions, create an issue (protip: do a quick search first to see if someone else didn't ask the same question before!). You can also reach us at hello@docsify.opencollective.com.
Thank you to all the people who have already contributed to docsify!
Thank you to all our backers! [Become a backer]
Thank you to all our sponsors! (please ask your company to also support this open source project by becoming a sponsor)