Create a Doc, But Faster
If at any point you need a deeper explanation, see the docs above in the sidebar
- Make sure you have node, yarn, and git installed
- Fork the Repository
-
git clone https://github.com/<your_username>/pan.dev.git
-
cd pan.dev
-
yarn
-
git checkout -b <feature-branch>
-
yarn start
- Create File
touch docs/tutorials/new-doc.md
- Add frontmatter with unique
id
docs/tutorial/new-doc.md
---
id: new-doc-id
title: New Doc
sidebar_label: New Doc
---
- Add to sidebar it fits in
sidebars.ts
cloud: [ // Add your new doc inside an existing sidebar
{
type: 'category',
label: 'Tutorials', // Category label
items: ['tutorials/api', 'tutorials/new-doc-id'], // Document ID (including relative path after docs)
},
],
-
yarn start //get live preview of site while editing
-
Add markdown to file below frontmatter
-
git add .
-
git commit -m "commit message"
-
git push origin <feature-branch>
-
The output of the
git push
will include "Create a pull request for 'new-contributing' on GitHub by visiting." Visit that link. It should look like:
https://github.com/<username>/pan.dev/pull/new/<feature-branch>
- Add details and click
Create Pull Request
- Check out the deploy preview
Now that the pull request is open, we'll automatically generate a preview of the changes and post the URL to view them within the pull request.