Skip to content

Commit c272379

Browse files
committed
Update README
1 parent c0a3d95 commit c272379

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ An extension for Visual Studio Code and compatible IDEs that provides autocomple
1717
### Validation and diagnostics
1818
- **Frontmatter validation**: Validates frontmatter fields against schema.
1919
- **Directive syntax validation**: Real-time validation with red underlines and hover cards for errors.
20+
- **Applies-to validation**: Validates `applies_to` syntax in frontmatter, inline roles, and section-level directives, including version format, range overlaps, and semantic rules.
2021
- **Substitution validation**: Warns when literal values should be replaced with substitution variables.
2122

2223
### Enhanced user experience
@@ -25,6 +26,7 @@ An extension for Visual Studio Code and compatible IDEs that provides autocomple
2526
- **Enhanced completion tooltips**: Get full variable values when selecting from autocompletion.
2627
- **Syntax highlighting**: Enhanced syntax highlighting for directives, parameters, roles, substitution variables, and mutation operators that works alongside standard Markdown highlighting.
2728
- **Built-in versions**: Automatically fetches and caches version substitutions from the docs-builder repository, available as `{{version.*}}` variables with autocompletion support.
29+
- **Vale style guide updates**: Automatically checks for updates to the [Elastic Vale style guide](https://github.com/elastic/vale-rules) and notifies you when a new version is available.
2830

2931
## Inline roles
3032

@@ -39,6 +41,27 @@ Use `{kbd}` to format keyboard shortcuts. Type `{kbd}` followed by a backtick to
3941
### Applies-to roles
4042
Use `{applies_to}` to specify product or deployment applicability. Type `{applies_to}` followed by a backtick to see available product keys and lifecycle states.
4143

44+
**Version syntax options:**
45+
46+
```markdown
47+
{applies_to}`stack: ga 9.1` # 9.1+ (implicit, greater than or equal)
48+
{applies_to}`stack: ga 9.1+` # 9.1+ (explicit)
49+
{applies_to}`stack: preview 9.0-9.2` # Version range (9.0 through 9.2)
50+
{applies_to}`stack: beta =9.1` # Exact version only
51+
```
52+
53+
**Multiple lifecycle entries:**
54+
55+
```markdown
56+
{applies_to}`stack: preview 9.0-9.1, ga 9.2+`
57+
{applies_to}`elasticsearch: preview 9.0-9.1, ga 9.2-9.5, deprecated 9.6+`
58+
```
59+
60+
**Validation rules:**
61+
- Version ranges must not overlap within the same key.
62+
- Only one unbound value (with `+`) is allowed per key.
63+
- The extension provides hints for implicit version syntax and suggests explicit `+` or `=`.
64+
4265
### Subs roles
4366
Use `{subs}` for inline code that contains substitution variables. Type `{subs}` followed by a backtick, then use `{{variable}}` syntax with full autocompletion and mutation support.
4467

@@ -58,6 +81,7 @@ Example: `{subs}`wget elasticsearch-{{version}}.tar.gz``
5881
- `{tab-set}` and `{tab-item}` - Tabbed content (supports `:group:` and `:sync:`)
5982
- `{stepper}` and `{step}` - Step-by-step guides
6083
- `{applies-switch}` and `{applies-item}` - Tabbed content with applies_to badges
84+
- `{applies_to}` - Section-level applicability markers with version syntax support
6185

6286
### Media and visuals
6387
- `{image}` - Images with alt text and sizing options
@@ -132,6 +156,23 @@ If you need to refresh the versions cache manually:
132156

133157
The versions are sourced from the `versions.yml` file in the docs-builder repository and include all versioning systems defined there, such as stack versions, product-specific versions, and more.
134158

159+
### Vale style guide update notifications
160+
161+
If you have the [Elastic Vale style guide](https://github.com/elastic/vale-rules) installed locally, the extension automatically checks for updates when it activates. When a new version is available, a notification appears with two options:
162+
163+
- **Update**: Runs the appropriate install script for your operating system in the integrated terminal.
164+
- **More Info**: Opens the vale-rules repository in your browser to view release notes and documentation.
165+
166+
**Notes:**
167+
- The check only runs if Vale is installed locally (the extension looks for the VERSION file in the standard installation path).
168+
- If Vale is not installed, no notification is shown.
169+
- The check runs asynchronously and fails silently if the network is unavailable, so it never affects extension performance.
170+
171+
**Manual check:**
172+
If you want to manually check for Vale style guide updates:
173+
1. Press `Ctrl/Cmd+Shift+P` to open the Command Palette.
174+
2. Run **Elastic Docs: Check for Vale Style Guide Updates**.
175+
135176
### Substitution validation and quick fixes
136177

137178
The extension automatically detects when you're using literal values that can be replaced with substitution variables. For example, if you have a substitution variable `{{product.apm}}` defined in your `docset.yml` file with the value "APM", the extension shows a warning when you type "APM" directly in your content, suggesting you use `{{product.apm}}` instead.
@@ -161,6 +202,7 @@ This helps maintain consistency across your documentation and makes it easier to
161202
- Notice validation warnings for literal values that could use substitutions
162203
- Hover over variables with mutations to see transformation previews
163204
- Use the Command Palette to manually refresh versions cache if needed
205+
- If you have Vale installed, watch for update notifications when new style guide versions are released
164206

165207
## Installation
166208

0 commit comments

Comments
 (0)