app-template/app/docs/.vitepress/config.mts

161 lines
5.6 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { defineConfig } from "vitepress";
const zhNav = [
{ text: "是什么", link: "/guide/what-is" },
{ text: "功能", link: "/guide/library" },
{ text: "上手", link: "/guide/quick-start" },
{ text: "问题", link: "/guide/faq" },
];
const zhSidebar = [
{
text: "了解帆幕",
items: [
{ text: "帆幕是什么", link: "/guide/what-is" },
{ text: "快速上手", link: "/guide/quick-start" },
],
},
{
text: "怎么用",
items: [
{ text: "连网盘", link: "/guide/mount" },
{ text: "找视频", link: "/guide/browse" },
{ text: "媒体库", link: "/guide/library" },
{ text: "看片和弹幕", link: "/guide/danmaku" },
{ text: "认出是哪部剧", link: "/guide/scrape" },
{ text: "账号和进度", link: "/guide/account" },
],
},
{
text: "帮助",
items: [{ text: "常见问题", link: "/guide/faq" }],
},
];
const enNav = [
{ text: "About", link: "/en/guide/what-is" },
{ text: "Features", link: "/en/guide/library" },
{ text: "Get started", link: "/en/guide/quick-start" },
{ text: "FAQ", link: "/en/guide/faq" },
];
const enSidebar = [
{
text: "About Fanmu",
items: [
{ text: "What is Fanmu", link: "/en/guide/what-is" },
{ text: "Get started", link: "/en/guide/quick-start" },
],
},
{
text: "How to use",
items: [
{ text: "Mount a drive", link: "/en/guide/mount" },
{ text: "Find a video", link: "/en/guide/browse" },
{ text: "Library", link: "/en/guide/library" },
{ text: "Watch and danmaku", link: "/en/guide/danmaku" },
{ text: "Identify the show", link: "/en/guide/scrape" },
{ text: "Accounts and progress", link: "/en/guide/account" },
],
},
{
text: "Help",
items: [{ text: "FAQ", link: "/en/guide/faq" }],
},
];
// 文档站:VitePress;产品说明文档,中文在根路径,英文在 /en
export default defineConfig({
cleanUrls: true,
lastUpdated: true,
head: [["link", { rel: "icon", href: "/favicon.svg" }]],
locales: {
root: {
label: "简体中文",
lang: "zh-CN",
link: "/",
title: "帆幕文档",
description: "帆幕 — 自己的影音库,看片有弹幕。挂网盘、播视频、飘弹幕。",
themeConfig: {
nav: zhNav,
sidebar: zhSidebar,
outline: { level: [2, 3], label: "本页目录" },
search: {
provider: "local",
options: {
translations: {
button: { buttonText: "搜索", buttonAriaLabel: "搜索文档" },
modal: {
noResultsText: "未找到结果",
resetButtonTitle: "清除查询",
footer: {
selectText: "选择",
navigateText: "切换",
closeText: "关闭",
},
},
},
},
},
docFooter: { prev: "上一篇", next: "下一篇" },
darkModeSwitchLabel: "主题",
sidebarMenuLabel: "菜单",
returnToTopLabel: "回到顶部",
langMenuLabel: "切换语言",
lastUpdatedText: "更新于",
notFound: {
title: "页面不存在",
quote: "这里什么都没有",
linkLabel: "回首页",
linkText: "回首页",
},
},
},
en: {
label: "English",
lang: "en",
link: "/en/",
title: "Fanmu Docs",
description:
"Fanmu — your own media library with danmaku. Mount a drive, play video, watch comments fly.",
themeConfig: {
nav: enNav,
sidebar: enSidebar,
outline: { level: [2, 3], label: "On this page" },
search: {
provider: "local",
options: {
translations: {
button: { buttonText: "Search", buttonAriaLabel: "Search docs" },
modal: {
noResultsText: "No results",
resetButtonTitle: "Clear query",
footer: {
selectText: "Select",
navigateText: "Navigate",
closeText: "Close",
},
},
},
},
},
docFooter: { prev: "Previous", next: "Next" },
darkModeSwitchLabel: "Theme",
sidebarMenuLabel: "Menu",
returnToTopLabel: "Back to top",
langMenuLabel: "Change language",
lastUpdatedText: "Updated",
notFound: {
title: "Page not found",
quote: "Nothing lives at this address",
linkLabel: "Go home",
linkText: "Go home",
},
},
},
},
markdown: {
lineNumbers: true,
},
});