add vitepress doc

This commit is contained in:
Timi
2026-09-21 15:32:12 +08:00
parent 2fc96083c4
commit efd683e808
81 changed files with 7319 additions and 90 deletions
+6
View File
@@ -57,6 +57,12 @@ const prismLanguageAliasMap: Record<string, string> = {
vue: "markup"
};
/**
* 把语言名归一化为 Prism 使用的名称,处理 `html → markup`、`ts → typescript`、`sh → bash` 等别名
*
* @param language 语言名或别名
* @returns Prism 语言名,语言未加载或不支持时返回空字符串
*/
export function resolvePrismLanguage(language?: string | null) {
if (!language) {
return "";