Submitting a Pull Request¶
To add or update content for a doc site, you need to make the changes locally and then submit a pull request for review.
Prerequisites¶
Instructions¶
Here's how to make doc updates and submit a pull request.
- Open GitHub Desktop.
-
Complete one of the following:
- If you have worked on these docs before, fetch the latest version of the doc repo to your local device.
- If you haven't worked on these docs before, clone the doc repo to your local device.
-
Create a new branch off the
developbranch. - Open the docs repo in a source code editor.
- Open a command-line application.
- Browse to the local directory for the docs.
-
Run the
mkdocs servecommand.Note
If there is an issue running the docs locally, an error will display indicating the issue. More than likely you are missing a file or have used bad syntax somewhere and the message will tell you exactly where to look.
-
Open a web browser and go to: http://127.0.0.1:8000/
You should now see a preview of the docs in the browser.
Tip
As you make changes, the local version of the docs updates automatically.
-
Update the docs.
Tip
See the Recommended Reading section for tips on how to write and lay out docs.
-
Once you are finished making updates, open GitHub Desktop, commit your changes to your branch, and push the branch to GitHub.
- Open a web browser and access the doc repo in GitHub.
-
Submit a pull request and request a review of your changes from Andy Graham.
Andy will then review your changes and approve once acceptable. The updates you made will then get deployed to the live docs site.
Tips¶
- Take a look at the repos for existing docs, such as the DataSeer docs repo, to see examples of how to build and layout content.
-
It is highly recommended that you run the docs locally when you are making updates. This lets you see a live preview of changes once you save them and also lets you see details about errors and bad markdown syntax.
- To run the docs locally, open a command-line tool, browse to the local directory for the docs, and run the
mkdocs servecommand. - Open a web browser and go to: http://127.0.0.1:8000/ to see a live preview of the updated docs.
- Keep an eye on the command-line for notifications about errors and bad markdown syntax.
- To run the docs locally, open a command-line tool, browse to the local directory for the docs, and run the
-
When you add a new page to a doc site, make sure you also add a link to it under
navin themkdocs.ymlfile. This ensures that users can access the page from the left navigation bar. - Store images for docs in the
/docs/assets/imagesfolder. This makes it easier to locate images and allows you to re-use images in multiple articles.
Recommended Reading¶
You must write docs in GitHub Flavored Markdown (GFM). However, the theme for the docs features a number of extensions that give you the ability to add elements using custom markdown syntax.
Check out the following resources to learn more:
| Resource | Description |
|---|---|
| Markdown Cheatsheet | Learn the basics about writing in markdown. |
| MkDocs-Material: Extensions | Learn the special markdown syntax you can use to add callouts and code blocks. |
| MkDocs User Guide | Learn how to write and layout markdown files. |