mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
docs: create a markdown code snippet file to make it easier for contributors (#15611)
adds snippets to make some of the docs markdown components a little easier to use - wraps selected text where it seems appropriate - limits code block languages (these are suggestions, you can choose from the list or enter anything) tabs example:  --------- Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -17,6 +17,8 @@ yarn-error.log
|
|||||||
# Allow VSCode recommendations and default settings in project root.
|
# Allow VSCode recommendations and default settings in project root.
|
||||||
!/.vscode/extensions.json
|
!/.vscode/extensions.json
|
||||||
!/.vscode/settings.json
|
!/.vscode/settings.json
|
||||||
|
# Allow code snippets
|
||||||
|
!/.vscode/*.code-snippets
|
||||||
|
|
||||||
# Front-end ignore patterns.
|
# Front-end ignore patterns.
|
||||||
.next/
|
.next/
|
||||||
|
@ -20,6 +20,8 @@ yarn-error.log
|
|||||||
# Allow VSCode recommendations and default settings in project root.
|
# Allow VSCode recommendations and default settings in project root.
|
||||||
!/.vscode/extensions.json
|
!/.vscode/extensions.json
|
||||||
!/.vscode/settings.json
|
!/.vscode/settings.json
|
||||||
|
# Allow code snippets
|
||||||
|
!/.vscode/*.code-snippets
|
||||||
|
|
||||||
# Front-end ignore patterns.
|
# Front-end ignore patterns.
|
||||||
.next/
|
.next/
|
||||||
|
38
.vscode/markdown.code-snippets
vendored
Normal file
38
.vscode/markdown.code-snippets
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
// For info about snippets, visit https://code.visualstudio.com/docs/editor/userdefinedsnippets
|
||||||
|
|
||||||
|
"admonition": {
|
||||||
|
"prefix": "#callout",
|
||||||
|
"body": [
|
||||||
|
"<blockquote class=\"admonition ${1|caution,important,note,tip,warning|}\">\n",
|
||||||
|
"${TM_SELECTED_TEXT:${2:add info here}}\n",
|
||||||
|
"</blockquote>\n"
|
||||||
|
],
|
||||||
|
"description": "callout admonition caution info note tip warning"
|
||||||
|
},
|
||||||
|
"fenced code block": {
|
||||||
|
"prefix": "#codeblock",
|
||||||
|
"body": ["```${1|apache,bash,console,diff,Dockerfile,env,go,hcl,ini,json,lisp,md,powershell,shell,sql,text,tf,tsx,yaml|}", "${TM_SELECTED_TEXT}$0", "```"],
|
||||||
|
"description": "fenced code block"
|
||||||
|
},
|
||||||
|
"image": {
|
||||||
|
"prefix": "#image",
|
||||||
|
"body": "$0",
|
||||||
|
"description": "image"
|
||||||
|
},
|
||||||
|
"tabs": {
|
||||||
|
"prefix": "#tabs",
|
||||||
|
"body": [
|
||||||
|
"<div class=\"tabs\">\n",
|
||||||
|
"${1:optional description}\n",
|
||||||
|
"## ${2:tab title}\n",
|
||||||
|
"${TM_SELECTED_TEXT:${3:first tab content}}\n",
|
||||||
|
"## ${4:tab title}\n",
|
||||||
|
"${5:second tab content}\n",
|
||||||
|
"## ${6:tab title}\n",
|
||||||
|
"${7:third tab content}\n",
|
||||||
|
"</div>\n"
|
||||||
|
],
|
||||||
|
"description": "tabs"
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user