Skip to content

Instantly share code, notes, and snippets.

@YDX-2147483647
Created July 18, 2023 13:31
Show Gist options
  • Save YDX-2147483647/64533d0550836e4a18ee99003b937e6d to your computer and use it in GitHub Desktop.
Save YDX-2147483647/64533d0550836e4a18ee99003b937e6d to your computer and use it in GitHub Desktop.
VS Code `tasks.json` for mkdocs serve with a problem matcher
{
"version": "2.0.0",
"tasks": [
{
"label": "Serve",
"command": "mkdocs",
"type": "process",
"args": [
"serve",
],
"group": "build",
"isBackground": true,
"problemMatcher": {
"owner": "mkdocs",
"pattern": {
"regexp": "^(WARNING|ERROR)\\s+-\\s+(.+)$",
"kind": "file",
"severity": 1,
"message": 2,
},
"background": {
"activeOnStart": true,
"beginsPattern": "^INFO\\s+-\\s+\\[\\d{2}:\\d{2}:\\d{2}\\]\\s+Detected file changes",
"endsPattern": "^INFO\\s+-\\s+(\\[\\d{2}:\\d{2}:\\d{2}\\]\\s+Reloading browsers|Documentation built in)",
},
},
"presentation": {
"reveal": "silent",
"revealProblems": "onProblem",
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment