Add MkDocs configuration and tasks for local documentation setup via vscode run and debug (#7251)

This commit is contained in:
silversword411 2025-08-29 05:10:35 -04:00 committed by GitHub
parent d2433cb250
commit 3cf6b9334c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 73 additions and 0 deletions

10
.vscode/launch.json vendored
View File

@ -10,6 +10,16 @@
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"name": "Test docs locally with mkdocs",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/docs/env/Scripts/mkdocs.exe",
"args": ["serve", "--dev-addr", "127.0.0.1:8010"],
"cwd": "${workspaceFolder}/docs",
"console": "integratedTerminal",
"preLaunchTask": "Start MkDocs Server"
}
]
}

60
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,60 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Setup Python Environment",
"type": "shell",
"command": "python",
"args": ["-m", "venv", "env"],
"options": {
"cwd": "${workspaceFolder}/docs"
},
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"problemMatcher": []
},
{
"label": "Install MkDocs Requirements",
"type": "shell",
"command": ".\\env\\Scripts\\activate.ps1; python -m pip install --upgrade pip; pip install -r requirements.txt",
"options": {
"cwd": "${workspaceFolder}/docs"
},
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"problemMatcher": [],
"dependsOn": "Setup Python Environment"
},
{
"label": "Start MkDocs Server",
"type": "shell",
"command": ".\\env\\Scripts\\activate.ps1; Start-Process http://localhost:8010; mkdocs serve",
"options": {
"cwd": "${workspaceFolder}/docs"
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"problemMatcher": [],
"isBackground": true,
"dependsOn": "Install MkDocs Requirements"
}
]
}

3
docs/requirements.txt Normal file
View File

@ -0,0 +1,3 @@
mkdocs>=1.5.0
mkdocs-material>=9.0.0
mkdocs-print-site-plugin>=2.3.0