Skip to content

Commit 1dce903

Browse files
committed
add console syntax documentation
1 parent a817506 commit 1dce903

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docs/syntax/code.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,38 @@ will output:
9191
var apiKey = new ApiKey("<API_KEY>"); // However this is
9292
var client = new ElasticsearchClient("<CLOUD_ID>", apiKey);
9393
```
94+
95+
96+
## Console output
97+
98+
We document alot of API endpoints at Elastic for this you can use `console` as language. The term console relates to the dev console in kibana which users can link to directly from these code snippets.
99+
100+
:::{note}
101+
We are still actively developing this special block and it's features
102+
:::
103+
104+
````markdown
105+
```console
106+
GET /mydocuments/_search
107+
{
108+
"from": 1,
109+
"query": {
110+
"match_all" {}
111+
}
112+
}
113+
```
114+
````
115+
116+
Will render as:
117+
118+
```console
119+
GET /mydocuments/_search
120+
{
121+
"from": 1,
122+
"query": {
123+
"match_all" {}
124+
}
125+
}
126+
```
127+
128+
The first line is highlighted as a dev console string and the remainder as json.

0 commit comments

Comments
 (0)