You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Add short descriptions](#add-short-descriptions)
36
+
-[Use shortcodes for latest versions and dates](#use-shortcodes-for-versions-and-dates)
35
37
-[Guidance enforcement](#guidance-enforcement)
36
38
<!-- vale Platform.condescending = YES -->
37
39
@@ -399,6 +401,31 @@ something that makes sense out of the context of the rest of the page.
399
401
Remember to keep it short.
400
402
If possible, it should be no more than about 160 characters.
401
403
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
+
402
429
## Guidance enforcement
403
430
404
431
Some of the rules are enforced with [Vale](https://docs.errata.ai/vale/about), a linter for prose.
0 commit comments