forked from cloudflare/cloudflare-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devdocs.code-snippets
228 lines (227 loc) · 6.77 KB
/
devdocs.code-snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
{
"Aside with header": {
"prefix": ["asideheader"],
"body": [
"{{<Aside type=\"${1|note,warning|}\" header=\"${2:header}\">}}",
"$0$TM_SELECTED_TEXT",
"{{</Aside>}}"
],
"description": "Aside shortcode with header text",
"scope": "markdown"
},
"Aside without header": {
"prefix": ["asidenoheader"],
"body": [
"{{<Aside type=\"${1|note,warning|}\">}}",
"$0$TM_SELECTED_TEXT",
"{{</Aside>}}"
],
"description": "Aside shortcode without a header",
"scope": "markdown"
},
"Surround with content-column": {
"prefix": ["ccol"],
"body": [
"{{<content-column>}}",
"",
"$0$TM_SELECTED_TEXT",
"",
"{{</content-column>}}"
],
"description": "Surround selection with content-column shortcodes",
"scope": "markdown"
},
"Surround with table-wrap": {
"prefix": ["tblwrap"],
"body": [
"{{<table-wrap>}}",
"",
"$0$TM_SELECTED_TEXT",
"",
"{{</table-wrap>}}"
],
"description": "Surround selection with table-wrap shortcodes",
"scope": "markdown"
},
"Directory listing": {
"prefix": ["directory"],
"body": [
"{{<directory-listing>}}"
],
"description": "Add directory-listing shortcode",
"scope": "markdown"
},
"Markdown header: full file": {
"prefix": ["headerfullfile"],
"body": [
"---",
"title: ${1:title}",
"pcx_content_type: ${2|overview,get-started,tutorial,concept,how-to,integration-guide,configuration,reference,navigation,faq,troubleshooting,changelog,glossary,learning-path,learning-module,learning-unit|}",
"weight: TODO",
"---",
"",
"# ${1:title}",
"",
"$0"
],
"description": "Header for a complete Markdown file",
"scope": "markdown"
},
"Markdown header: partial file": {
"prefix": ["headerpartialfile"],
"body": [
"---",
"_build:",
" publishResources: false",
" render: never",
" list: never",
"---",
"",
"$0"
],
"description": "Header for a partial Markdown file",
"scope": "markdown"
},
"Markdown header: partial file with input parameters": {
"prefix": ["headerpartialfileparams"],
"body": [
"---",
"_build:",
" publishResources: false",
" render: never",
" list: never",
"inputParameters: ${1:param1;;param2}",
"---",
"",
"$0"
],
"description": "Header for a partial Markdown file",
"scope": "markdown"
},
"Markdown header: external link page": {
"prefix": ["headerexternallink"],
"body": [
"---",
"pcx_content_type: navigation",
"title: ${1:title}",
"external_link: ${2:url}",
"weight: ${3:weight}",
"_build:",
" publishResources: false",
" render: never",
"---",
]
},
"Markdown header: add meta title": {
"prefix": ["metatitle"],
"body": [
"meta:",
" title: $0"
],
"description": "Meta title in Markdown header",
"scope": "yaml"
},
"Markdown header: add meta description": {
"prefix": ["metadescription"],
"body": [
"meta:",
" description: $0"
],
"description": "Meta description in Markdown header",
"scope": "yaml"
},
"Heading pill": {
"prefix": ["headingpill", "pillheading"],
"body": [
"{{<heading-pill style=\"${1|alpha,beta,early-access,deprecated|}\">}}$0{{</heading-pill>}}",
],
"description": "Heading pill enclosing some text",
"scope": "markdown"
},
"Inline pill": {
"prefix": ["inlinepill", "pillinline"],
"body": [
"{{<inline-pill style=\"${1|alpha,beta,early-access,deprecated|}\">}}",
],
"description": "Inline pill after some text",
"scope": "markdown"
},
"Render/include partial": {
"prefix": ["partialinclude", "renderpartial"],
"body": [
"{{<render file=\"$0\">}}"
],
"description": "Includes content from a partial in the current document",
"scope": "markdown"
},
"Render/include partial with parameters": {
"prefix": ["partialincludeparams", "renderpartialparams"],
"body": [
"{{<render file=\"$1\" withParameters=\"${2:value1;;value2}\">}}"
],
"description": "Includes content from a partial with input parameters in the current document",
"scope": "markdown"
},
"Adds two tabs for dashboard/API instructions": {
"prefix": ["addtabs", "twotabs"],
"body": [
"{{<tabs labels=\"Dashboard | API\">}}",
"{{<tab label=\"dashboard\" no-code=\"true\">}}",
"",
"$0",
"",
"{{</tab>}}",
"{{<tab label=\"api\" no-code=\"true\">}}",
"",
"",
"",
"{{</tab>}}",
"{{</tabs>}}",
],
"description": "Adds a new tabs section with two tabs for dashboard and API instructions",
"scope": "markdown"
},
"Create collapsible details section": {
"prefix": ["detailssection", "collapsible"],
"body": [
"{{<details header=\"${1:header}\">}}",
"",
"$0$TM_SELECTED_TEXT",
"",
"{{</details>}}",
],
"description": "Creates a new collapsible details section with a title and a body",
"scope": "markdown"
},
"Create FAQ entry": {
"prefix": ["faqentry", "faqitem"],
"body": [
"{{<faq-item>}}",
"{{<faq-question text=\"${1:question}\">}}",
"{{<faq-answer>}}",
"",
"$0$TM_SELECTED_TEXT",
"",
"{{</faq-answer>}}",
"{{</faq-item>}}",
],
"description": "Create FAQ entry (heading level 2, default)",
"scope": "markdown"
},
"Glossary tooltip": {
"prefix": ["glossarytooltip"],
"body": [
"{{<glossary-tooltip term_id=\"${1:term}\">}}$0$TM_SELECTED_TEXT{{</glossary-tooltip>}}",
],
"description": "Adds a new glossary reference, displaying its definition as a tooltip",
"scope": "markdown"
},
"Glossary definition": {
"prefix": ["glossarydefinition"],
"body": [
"{{<glossary-definition term_id=\"${1:term}\">}}",
],
"description": "Adds the definition of a glossary entry in the current location",
"scope": "markdown"
},
}