Skip to content

Commit f266b3c

Browse files
authored
Merge pull request #4755 from platformsh/4754-update-content-style-guide
feat: updated content style guide
2 parents c267571 + 662d030 commit f266b3c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

contributing/content-style.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This content style guide should help make sure the Platform.sh docs are clear an
1717
- [Use inclusive language](#use-inclusive-language)
1818
- [Resources for inclusive language](#resources-for-inclusive-language)
1919
- [Use meaningful link text](#use-meaningful-link-text)
20+
- [Use imperative verbs](#use-verbs-imperatives-for-headings-and-section-titles)
2021
- [Link at the end of sentences in sentence case](#link-at-the-end-of-sentences-in-sentence-case)
2122
- [Minimize distractions](#minimize-distractions)
2223
- [Include alt text](#include-alt-text)
@@ -32,6 +33,7 @@ This content style guide should help make sure the Platform.sh docs are clear an
3233
- [Make commands work across shells](#make-commands-work-across-shells)
3334
- [Use notes appropriately](#use-notes-appropriately)
3435
- [Add short descriptions](#add-short-descriptions)
36+
- [Use shortcodes for latest versions and dates](#use-shortcodes-for-versions-and-dates)
3537
- [Guidance enforcement](#guidance-enforcement)
3638
<!-- vale Platform.condescending = YES -->
3739

@@ -399,6 +401,31 @@ something that makes sense out of the context of the rest of the page.
399401
Remember to keep it short.
400402
If possible, it should be no more than about 160 characters.
401403

404+
## Use shortcodes for versions and dates
405+
406+
When referencing service or runtime versions in documentation, always use the shortcode `{{% latest "xxx" %}}` instead of hardcoding version numbers. Replace `xxx` with the name of the service or runtime exactly as it appears in the `.json` or `.yaml` file you’re referring to.
407+
408+
For example, if you’re editing a code snippet like this:
409+
410+
```yaml {configFile="services"}
411+
mariadb:
412+
type: mariadb:11.4
413+
disk: 2048
414+
```
415+
You should replace the hardcoded version with the shortcode:
416+
417+
```yaml {configFile="services"}
418+
mariadb:
419+
type: mariadb:{{% latest "mariadb" %}}
420+
disk: 2048
421+
```
422+
423+
In this case, `{{% latest "mariadb" %}}` automatically pulls in the most recent version of MariaDB (e.g. `11.4`) and will update automatically as new versions become available. The value inside the shortcode that follows `latest` (in this case, it is `"mariadb"`) must match how the service name is presented in the `.yaml` file. For instance, `{{% latest "mariadb" %}}` is correct, but `{{% latest "Maria DB" %}}` is wrong.
424+
425+
Similarly, use `{{ now.Year }}` instead of hardcoding a specific year. This ensures the current year is always displayed and helps keep time references up to date.
426+
427+
Using these shortcodes improves accuracy and reduces the need for manual updates across the documentation.
428+
402429
## Guidance enforcement
403430

404431
Some of the rules are enforced with [Vale](https://docs.errata.ai/vale/about), a linter for prose.

0 commit comments

Comments
 (0)