-
Notifications
You must be signed in to change notification settings - Fork 166
Contribution, Testing Content (GitHub Method)
Once your content is submitted via a pull request, a set of automated tests will be run. To simplify this testing, and speed fixes, most of these tests can be run locally. Most of this section requires that you have gone through the environment set up process already.
-
Run the bulk of the automated tests locally. This will run most of the automated GitHub Actions tests.
cd tanzu-dev-portal make test
NOTE: Running these tests requires Docker to be running (On Mac OS X requires Docker Desktop 2.4 or newer)
-
Run the automated spelling check test. The automated test for checking spelling needs to be run separately if you want to run it prior to submitting.
make spell
-
Build a preview of the website. As a final check, build the website locally and make sure your content looks as you intend. Especially look for markdown errors and images that aren't being shown. The website will be available at
http://localhost:1313/developer.make preview
NOTE: You can set the front matter date in the future if you want the content to be visible on a specific date. However, you will need to use the
hugo servercommand instead ofmake previewand you will need to include the-Fflag to see the post. -
Fix any issues that come up during local tests. Any build issues are unlikely if you are just submitting content. Most common issues, and their mitigation, are as follows:
-
Broken links - Broken links are a common issus when running
make test. Here, simply double check your links and click on every link in your content during the preview of the website. -
Spelling Errors - These are very common errors found during
make spell. Here, it is preferred that fixes are prioritized as fixing any spelling mistakes, rewording your content to use a different word if possible, then add the word tocustom_dict.txtfor words that should not be flagged. This file is in the repositories root directory. It gets sorted as a pre-commit hook so you can just add your entries to the end of the file and not worry about the order.
-
Broken links - Broken links are a common issus when running
- Start Here
- Prewriting / Ideation
- Setting Up You Environment to Create Content
- Drafting Content
- Editing Content
- Testing Content Locally
- Committing Content to be Published
- Content Next Steps
- Start Here
- Prewriting / Ideation
- Tools you need (hint: it's Google Docs)
- Drafting Content
- Editing Content
- Contributing Content