fix(caddy): val terug op nginx-grammar voor Caddyfile syntax-highlighting
Shiki 1.29 bundelt geen 'caddyfile' grammar — runtime error "Language 'caddyfile' is not included in this bundle". Nginx-grammar is syntactisch het dichtst bij (directives + nested braces + reverse_proxy lijkt op location-blocks), dus levert acceptabele kleuring zonder dependency toe te voegen. Echte Caddyfile-grammar zou via een externe TextMate JSON moeten worden geladen — later. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
44e9280de1
commit
84d7bb0add
1 changed files with 3 additions and 1 deletions
|
|
@ -16,8 +16,10 @@ export default async function CaddyPage() {
|
||||||
let configError: string | null = null
|
let configError: string | null = null
|
||||||
try {
|
try {
|
||||||
const raw = await execAgent('caddy_show_config')
|
const raw = await execAgent('caddy_show_config')
|
||||||
|
// shiki 1.29 bundelt geen caddyfile-grammar; nginx is syntactisch het
|
||||||
|
// dichtst bij (directives + braces + reverse_proxy lijkt op locations)
|
||||||
configHtml = await codeToHtml(raw || '# (empty)', {
|
configHtml = await codeToHtml(raw || '# (empty)', {
|
||||||
lang: 'caddyfile',
|
lang: 'nginx',
|
||||||
theme: 'github-dark',
|
theme: 'github-dark',
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue