📝 优化文档显示

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
run: |-
python -m pip install litedoc
python -m litedoc mbcp -o docs/zh/api -l zh-Hans
python -m litedoc mbcp -o docs/en/api -l en
python -m litedoc mbcp -o docs/ja/api -l ja
python -m litedoc mbcp -o docs/zht/api -l zh-Hant
python -m litedoc mbcp -o docs/zh/api -l zh-Hans -f editLink=false
python -m litedoc mbcp -o docs/en/api -l en -f editLink=false
python -m litedoc mbcp -o docs/ja/api -l ja -f editLink=false
python -m litedoc mbcp -o docs/zht/api -l zh-Hant -f editLink=false
- name: 安装 pnpm
uses: pnpm/action-setup@v2

View File

@ -9,10 +9,10 @@ let defaultLocale = 'zh';
const commonSidebarOptions = {
collapsed: true,
convertSameNameSubFileToGroupIndexPage: true,
useFolderTitleFromIndexFile: true,
useFolderLinkFromIndexFile: true,
useTitleFromFrontmatter: true,
useTitleFromFileHeading: true,
useFolderTitleFromIndexFile: true,
useFolderLinkFromIndexFile: true,
includeFolderIndexFile: true,
}
export const common = defineConfig({
@ -21,9 +21,6 @@ export const common = defineConfig({
markdown: {
math: true
},
vite: {
plugins: [],
},
rewrites: {
[`${defaultLocale}/:rest*`]: ":rest*",
},
@ -52,6 +49,13 @@ export const common = defineConfig({
socialLinks: [
{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: {
root: {label: "简体中文", ...zh},

View File

@ -1,3 +1,11 @@
# 开始不了一点
$\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/en/api -l en
python -m litedoc mbcp -o docs/ja/api -l ja
python -m litedoc mbcp -o docs/zht/api -l zh-Hant
python -m litedoc mbcp -o docs/zh/api -l zh-Hans -f editLink=false
python -m litedoc mbcp -o docs/en/api -l en -f editLink=false
python -m litedoc mbcp -o docs/ja/api -l ja -f editLink=false
python -m litedoc mbcp -o docs/zht/api -l zh-Hant -f editLink=false