Files
BotPages/scripts/generate-docs.ps1
2025-12-24 05:55:26 +03:00

23 lines
574 B
PowerShell

Param(
[string]$DocfxPath = "docfx",
[string]$WorkingDir = "$(Resolve-Path .)"
)
$ErrorActionPreference = 'Stop'
Write-Host "Generating docfx documentation..."
if (-not (Get-Command $DocfxPath -ErrorAction SilentlyContinue)) {
Write-Host "Docfx not found on PATH. Install docfx or provide full path to docfx.exe" -ForegroundColor Yellow
}
Push-Location $WorkingDir
try {
& $DocfxPath metadata docfx.json
& $DocfxPath build docfx.json
Write-Host "Docfx build complete. Output in _site folder" -ForegroundColor Green
}
finally {
Pop-Location
}