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
Copy file name to clipboardExpand all lines: README.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ An extension for Visual Studio Code and compatible IDEs that provides autocomple
24
24
-**Mutation preview**: See step-by-step transformation results when hovering over variables with mutations.
25
25
-**Enhanced completion tooltips**: Get full variable values when selecting from autocompletion.
26
26
-**Syntax highlighting**: Enhanced syntax highlighting for directives, parameters, roles, substitution variables, and mutation operators that works alongside standard Markdown highlighting.
27
+
-**Built-in versions**: Automatically fetches and caches version substitutions from the docs-builder repository, available as `{{version.*}}` variables with autocompletion support.
27
28
28
29
## Inline roles
29
30
@@ -114,6 +115,23 @@ sub:
114
115
115
116
These merge with `docset.yml` substitutions and are available throughout the document.
116
117
118
+
### Built-in versions from docs-builder
119
+
120
+
The extension automatically fetches version substitutions from the [docs-builder repository](https://github.com/elastic/docs-builder) and makes them available as `{{version.*}}` variables. These versions are cached locally and refreshed automatically every hour, ensuring you always have access to the latest version information.
121
+
122
+
**Available version variables:**
123
+
- Type `{{version.` to see all available version substitutions (e.g., `{{version.edot_php}}`, `{{version.stack}}`, `{{version.self}}`)
124
+
- Versions are automatically loaded when the extension activates
125
+
- The cache is refreshed automatically every hour in the background
126
+
127
+
**Manual refresh:**
128
+
If you need to refresh the versions cache manually:
129
+
1. Press `Ctrl/Cmd+Shift+P` to open the Command Palette
130
+
2. Run **Elastic Docs: Refresh Versions Cache**
131
+
3. The extension will fetch the latest versions from GitHub and update the cache
132
+
133
+
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.
134
+
117
135
### Substitution validation and quick fixes
118
136
119
137
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.
@@ -134,13 +152,15 @@ This helps maintain consistency across your documentation and makes it easier to
134
152
3.**Try the features**:
135
153
- Type `:::` to see directive completions
136
154
- Type `{icon}` followed by a backtick to see icon options
137
-
- Type `{{` to see substitution variables
155
+
- Type `{{` to see substitution variables (including built-in versions from docs-builder)
156
+
- Type `{{version.` to see available version substitutions
138
157
- Type `|` after a variable to see mutation operators
139
158
- Use `.elasticsearch` shorthand for `product.elasticsearch`
140
159
- Add `sub:` field in frontmatter for document-specific variables
141
160
- Add frontmatter fields and see autocompletion
142
161
- Notice validation warnings for literal values that could use substitutions
143
162
- Hover over variables with mutations to see transformation previews
163
+
- Use the Command Palette to manually refresh versions cache if needed
0 commit comments