feat: добавить хаб документаций
- добавлен React/Vite-лендинг с карточками документаций - добавлена генерация корневого llms.txt из конфига документов - добавлена сборка SLM Design через VitePress - добавлены Dockerfile, Caddyfile и Gitea CI/CD - настроены контекстные Link headers для llms.txt
This commit is contained in:
49
Caddyfile
Normal file
49
Caddyfile
Normal file
@@ -0,0 +1,49 @@
|
||||
:8082 {
|
||||
root * /srv
|
||||
|
||||
# Чистые URL: запросы вида `/foo.html` редиректим на `/foo`.
|
||||
@legacyHtml {
|
||||
path_regexp legacyHtml ^(/.+)\.html$
|
||||
not path /index.html
|
||||
}
|
||||
redir @legacyHtml {re.legacyHtml.1} 301
|
||||
|
||||
# LLM-артефакты остаются в своих пространствах документаций, без редиректа в корень.
|
||||
@slmDesign path /slm-design /slm-design/*
|
||||
header @slmDesign Link "</slm-design/llms.txt>; rel=\"llms\""
|
||||
|
||||
@nextjsStyleGuide path /nextjs-style-guide /nextjs-style-guide/*
|
||||
header @nextjsStyleGuide Link "</nextjs-style-guide/llms.txt>; rel=\"llms\""
|
||||
|
||||
@reactStyleGuide path /react-style-guide /react-style-guide/*
|
||||
header @reactStyleGuide Link "</react-style-guide/llms.txt>; rel=\"llms\""
|
||||
|
||||
@figmaAdaptiveStandards path /figma-adaptive-standards /figma-adaptive-standards/*
|
||||
header @figmaAdaptiveStandards Link "</figma-adaptive-standards/llms.txt>; rel=\"llms\""
|
||||
|
||||
@root {
|
||||
not path /slm-design /slm-design/* /nextjs-style-guide /nextjs-style-guide/* /react-style-guide /react-style-guide/* /figma-adaptive-standards /figma-adaptive-standards/*
|
||||
}
|
||||
header @root Link "</llms.txt>; rel=\"llms\""
|
||||
|
||||
@existingText {
|
||||
path *.txt
|
||||
file
|
||||
}
|
||||
header @existingText Content-Type "text/plain; charset=utf-8"
|
||||
|
||||
@existingMarkdown {
|
||||
path *.md
|
||||
file
|
||||
}
|
||||
header @existingMarkdown Content-Type "text/markdown; charset=utf-8"
|
||||
|
||||
@missingText {
|
||||
path *.txt *.md
|
||||
not file
|
||||
}
|
||||
respond @missingText 404
|
||||
|
||||
file_server
|
||||
try_files {path} {path}.html {path}/index.html /index.html
|
||||
}
|
||||
Reference in New Issue
Block a user