Skip to content

Commit d1f2de1

Browse files
eshabenCopilot
andauthored
add assets for external contributors and update contributing docs (#929)
* add assets for external contributors and update contributing docs * Update .CONTRIBUTING/.CONTRIBUTING.md Co-authored-by: Copilot <[email protected]> * ignore the contributing directory * update text color to white --------- Co-authored-by: Copilot <[email protected]>
1 parent d04cae7 commit d1f2de1

File tree

22 files changed

+6450
-37
lines changed

22 files changed

+6450
-37
lines changed
Lines changed: 27 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ This guide covers how to contribute to the documentation, including serving a lo
1313
- [Install Dependencies and Serve Site](#install-dependencies-and-serve-site)
1414
- [Adding New Pages](#adding-new-pages)
1515
- [Creating a New Section](#creating-a-new-section)
16-
- [Example `.pages` File](#example-pages-file)
16+
- [Example `.nav.yml` File](#example-navyml-file)
1717
- [Example `index.md` File](#example-indexmd-file)
1818
- [Adding Pages to Existing Section](#adding-pages-to-existing-section)
1919
- [Modifying Existing Pages](#modifying-existing-pages)
2020
- [Adding Code and Text Snippets](#adding-code-and-text-snippets)
2121
- [Adding Images](#adding-images)
22+
- [Image Annotations](#image-annotations)
2223
- [Search Engine Optimization (SEO)](#search-engine-optimization-seo)
23-
- [Tools for Editing](#tools-for-editing)
2424

2525
## Viewing Site Locally
2626

@@ -90,16 +90,16 @@ When adding new pages to the documentation site, it is important to ensure all r
9090

9191
To create a new section of pages, you will first need to create a subdirectory with the desired name of the section. The root directory, and every subdirectory, must contain the following files:
9292

93-
- **`.pages`**: Defines the structure of the documentation site.
93+
- **`.nav.yml`**: Defines the structure of the documentation site.
9494
- **`index.md`**: A landing page which can be used to provide more context about the content in the section.
9595

96-
#### Example `.pages` File
96+
#### Example `.nav.yml` File
9797

9898
```markdown
9999
title: Application Developers
100100
nav:
101101
- index.md
102-
- **'Polkadot SDK'**: 'polkadot-sdk.md'
102+
- 'Polkadot SDK': 'polkadot-sdk.md'
103103
- interact
104104
- tooling
105105
```
@@ -138,10 +138,9 @@ If you are adding pages to an existing section, the steps are simplified. Howeve
138138
- **`title`**: Represents the `<title>` tag and is used for SEO purposes (not displayed on the published site) Titles have a maximum length of 45 characters.
139139
- **`description`**: Represents the meta-description and is also used for SEO purposes (not displayed on the published site). Descriptions should be 120-160 characters and should provide a preview into the page topic.
140140
- **Page title**: An H1 heading title to be displayed at the top of the page.
141-
142141
- **`## Checking Prerequisites` section**: If the guide requires the user to have specific developer tools installed, for example, Docker or MetaMask, it should be listed here.
143142
144-
- **Add the 'Display Name'**: 'file-name.md' for the new page to the `.pages` folder in the same subdirectory where you added the new page.
143+
- **Add the 'Display Name'**: 'file-name.md' for the new page to the `.nav.yml` file in the same subdirectory where you added the new page.
145144
146145
An example new content page might look like:
147146
@@ -177,7 +176,7 @@ More resources for [SEO Optimization](#search-engine-optimization-seo) of titles
177176
3. Once you commit and push all of your changes, open a pull request for the new content branch against the `main` branch.
178177
4. Monitor notifications and pull requests for feedback from code owners. At least one approval is required before merging content.
179178
180-
If your additions or modifications are limited to content on an existing page, there is no need to worry about the [`.pages`](#example-pages-file) or [`index.md`](#example-indexmd-file) files, as changes to page content don't affect these files.
179+
If your additions or modifications are limited to content on an existing page, there is no need to worry about the [`.nav.yml`](#example-navyml-file) or [`index.md`](#example-indexmd-file) files, as changes to page content don't affect these files.
181180

182181
## Adding Code and Text Snippets
183182

@@ -197,48 +196,40 @@ Learn more about the effective use of [snippets](https://facelessuser.github.io/
197196

198197
## Adding Images
199198

200-
Images are stored in the `images` subdirectory. They are organized to mirror the structure of the docs site. For example, to add an image to the page `/develop/application-devs/tooling/chopsticks/overview.md`, you would place the image in the folder `images/application-devs/tooling/chopsticks/overview`
199+
- Store images in the `images` subdirectory, mirroring the docs site structure.
201200

202-
All images intended for display on the website should be in `.webp` format. You can look up an image converter online to convert from `.jpeg`, `.png`, or other formats to `.webp`.
201+
- **Example**: an image on the page `/develop/application-devs/tooling/chopsticks/overview.md` goes in the `images/application-devs/tooling/chopsticks/overview` folder.
203202

204-
To add an image to your page, you should have [alt text](https://developers.google.com/style/images#alt-text) and use the following syntax:
203+
- Use `.webp` format. You can look up an image converter online to convert from `.jpeg`, `.png`, or other formats to `.webp`.
204+
- Add [alt text](https://developers.google.com/style/images#alt-text) using the following syntax:
205205

206-
```markdown
207-
![Alt text goes here](/docs/images/<subdirectory>/<image-file-name>.webp)
208-
```
206+
```markdown
207+
![Alt text goes here](/docs/images/<subdirectory>/<image-file-name>.webp)
208+
```
209209

210210
See the [style guide](https://github.com/papermoonio/documentation-style-guide/blob/main/style-guide.md#screenshots) for more tips on handling images.
211211

212-
## Search Engine Optimization (SEO)
213-
214-
Here are some resources to help you create good titles and descriptions for SEO:
212+
### Image Annotations
215213

216-
- [Google's recommendation on good titles](https://developers.google.com/search/docs/advanced/appearance/title-link?hl=en)
217-
- [Google's recommendation on good descriptions](https://developers.google.com/search/docs/advanced/appearance/snippet?hl=en)
214+
To annotate images, you can use the provided assets for arrows and steps. These are located in the [.CONTRIBUTING/image-assets](./image-assets/) directory, which contains SVGs you can overlay on images.
218215

219-
In general, titles should be between 50 and 60 characters and descriptions should be between 120 and 160 characters.
216+
- **Arrows**: Highlight a single important aspect.
220217

221-
## Tools for Editing
218+
✅ Use arrows to highlight one key element.
222219

223-
There are a few tools you may find useful for proofreading and editing your contributions:
220+
❌ Do not use arrows if multiple elements need highlighting, use steps instead.
224221

225-
- **[Vale](https://vale.sh/)**: The `polkadot-mkdocs` repository contains configuration for Vale, an open source NLP-powered linter for text. The configuration is a work in progress with a growing custom dictionary tailored toward software engineering, blockchain, and Polkadot terms. Running Vale against your files locally can serve as a first round of feedback to speed up the review process.
222+
- **Steps**: Highlight multiple actions or elements. If the page shows a numbered list (1, 2, 3...), then use numeric steps (1–9) in the image. If the page shows an alphabetical list (a, b, c...), then use lettered steps (a–i) in the image.
226223

227-
To use Vale locally to screen your work:
224+
✅ Use steps to show several steps on a page.
228225

229-
1. Visit the Vale site and follow the [installation instructions](https://vale.sh/docs/vale-cli/installation/).
230-
2. From the `polkadot-mkdocs` directory, run the following in your terminal:
226+
❌ Do not use steps if there is only one thing to highlight, use an arrow instead.
231227

232-
```bash
233-
vale INSERT_PATH_TO_FILE
234-
```
235-
236-
The output will look something like:
237-
238-
![Vale sample terminal output](images/contributing/vale-output-01.webp)
228+
## Search Engine Optimization (SEO)
239229

240-
3. You can use CMD+click to open the file with the flagged items. This is especially helpful if you run Vale against a directory with multiple files.
230+
Here are some resources to help you create good titles and descriptions for SEO:
241231

242-
4. Each flag tells you the line and location of the flagged item, the level of the flag (error, warning, or suggestion), and a suggestion for how to resolve the flag.
232+
- [Google's recommendation on good titles](https://developers.google.com/search/docs/advanced/appearance/title-link?hl=en)
233+
- [Google's recommendation on good descriptions](https://developers.google.com/search/docs/advanced/appearance/snippet?hl=en)
243234

244-
5. Once you have addressed the flagged items and made edits as needed, you can complete the normal steps to commit your changes and open a pull request to review for merge.
235+
In general, titles should be between 50 and 60 characters and descriptions should be between 120 and 160 characters.

0 commit comments

Comments
 (0)