📝 优化文档显示

This commit is contained in:
远野千束 2024-08-30 14:29:58 +08:00
parent 77ca975cb5
commit efbf0731c9
4 changed files with 26 additions and 14 deletions

View File

@ -40,10 +40,10 @@ jobs:
- name: Setup API markdown - name: Setup API markdown
run: |- run: |-
python -m pip install litedoc python -m pip install litedoc
python -m litedoc mbcp -o docs/zh/api -l zh-Hans python -m litedoc mbcp -o docs/zh/api -l zh-Hans -f editLink=false
python -m litedoc mbcp -o docs/en/api -l en python -m litedoc mbcp -o docs/en/api -l en -f editLink=false
python -m litedoc mbcp -o docs/ja/api -l ja python -m litedoc mbcp -o docs/ja/api -l ja -f editLink=false
python -m litedoc mbcp -o docs/zht/api -l zh-Hant python -m litedoc mbcp -o docs/zht/api -l zh-Hant -f editLink=false
- name: 安装 pnpm - name: 安装 pnpm
uses: pnpm/action-setup@v2 uses: pnpm/action-setup@v2

View File

@ -9,10 +9,10 @@ let defaultLocale = 'zh';
const commonSidebarOptions = { const commonSidebarOptions = {
collapsed: true, collapsed: true,
convertSameNameSubFileToGroupIndexPage: true, convertSameNameSubFileToGroupIndexPage: true,
useFolderTitleFromIndexFile: true,
useFolderLinkFromIndexFile: true,
useTitleFromFrontmatter: true, useTitleFromFrontmatter: true,
useTitleFromFileHeading: true, useTitleFromFileHeading: true,
useFolderTitleFromIndexFile: true,
useFolderLinkFromIndexFile: true,
includeFolderIndexFile: true, includeFolderIndexFile: true,
} }
export const common = defineConfig({ export const common = defineConfig({
@ -21,9 +21,6 @@ export const common = defineConfig({
markdown: { markdown: {
math: true math: true
}, },
vite: {
plugins: [],
},
rewrites: { rewrites: {
[`${defaultLocale}/:rest*`]: ":rest*", [`${defaultLocale}/:rest*`]: ":rest*",
}, },
@ -52,6 +49,13 @@ export const common = defineConfig({
socialLinks: [ socialLinks: [
{icon: 'github', link: 'https://github.com/snowykami/mbcp'} {icon: 'github', link: 'https://github.com/snowykami/mbcp'}
], ],
editLink: {
pattern: 'https://github.com/snowykami/mbcp/tree/main/docs/:path'
},
aside: true ,
},
sitemap: {
hostname: 'https://mbcp.sfkm.me'
}, },
locales: { locales: {
root: {label: "简体中文", ...zh}, root: {label: "简体中文", ...zh},

View File

@ -1,3 +1,11 @@
# 开始不了一点 # 开始不了一点
$\int_{1}^{2} x111$ $\int_{1}^{2} x111$
# AAA
### BBB
# C
### ddd

View File

@ -1,4 +1,4 @@
python -m litedoc mbcp -o docs/zh/api -l zh-Hans python -m litedoc mbcp -o docs/zh/api -l zh-Hans -f editLink=false
python -m litedoc mbcp -o docs/en/api -l en python -m litedoc mbcp -o docs/en/api -l en -f editLink=false
python -m litedoc mbcp -o docs/ja/api -l ja python -m litedoc mbcp -o docs/ja/api -l ja -f editLink=false
python -m litedoc mbcp -o docs/zht/api -l zh-Hant python -m litedoc mbcp -o docs/zht/api -l zh-Hant -f editLink=false