diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index ec70bfa..5f4868e 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -24,7 +24,7 @@ jobs: NODE_OPTIONS: --max_old_space_size=4096 - uses: actions/upload-pages-artifact@v1 with: - path: docs/.vuepress/dist + path: docs/.vitepress/dist deploy: runs-on: ubuntu-20.04 needs: build diff --git a/.gitignore b/.gitignore index 8c97a9f..c646ae9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,12 +4,12 @@ node_modules/ # Build files packages/*/lib/ -# Vuepress Cache .cache/ -# Vuepress Temp +cache/ .temp/ -# Vuepress Output dist/ +.yarn* +yarn* # VitePress docs/.vitepress/dist diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.ts similarity index 59% rename from docs/.vitepress/config.mts rename to docs/.vitepress/config.ts index 53cf297..927b5bf 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.ts @@ -1,23 +1,33 @@ import { defineConfig } from 'vitepress' -import { configNav } from './nav' +import nav from './nav' +import mdPangu from "markdown-it-pangu"; +import katex from 'markdown-it-katex'; +import footnote from 'markdown-it-footnote'; +import { getSidebar } from 'vitepress-plugin-auto-sidebar' // https://vitepress.dev/reference/site-config export default defineConfig({ title: "RLE.wiki", description: "一份RLE指北", + markdown: { + config(md) { + md.use(mdPangu); + md.use(footnote); + md.use(katex); + }, + }, + dir: 'docs', + lastUpdated: true, themeConfig: { // https://vitepress.dev/reference/default-theme-config - nav: configNav, - - sidebar: [ - { - text: 'Examples', - items: [ - { text: 'Markdown Examples', link: '/markdown-examples' }, - { text: 'Runtime API Examples', link: '/api-examples' } - ] - } - ], + siteTitle: 'RLE.wiki', + nav, + sidebar: getSidebar({ + contentRoot: '/docs', + contentDirs: ['campus', 'contributor-guide', 'fashion'], + collapsible: true, + collapsed: true, + }), socialLinks: [ { icon: 'github', link: 'https://github.com/project-trans/RLE-wiki' } diff --git a/docs/.vitepress/env.d.ts b/docs/.vitepress/env.d.ts new file mode 100644 index 0000000..c390b34 --- /dev/null +++ b/docs/.vitepress/env.d.ts @@ -0,0 +1,5 @@ +declare module 'markdown-it-pangu' { + import { PluginSimple } from 'markdown-it' + const pangu: PluginSimple + export default pangu +} \ No newline at end of file diff --git a/docs/.vitepress/nav.ts b/docs/.vitepress/nav.ts index 45d2225..5fdd842 100644 --- a/docs/.vitepress/nav.ts +++ b/docs/.vitepress/nav.ts @@ -1,20 +1,26 @@ -// import { navbar } from "vuepress-theme-hope"; import { DefaultTheme } from 'vitepress' -export const configNav: DefaultTheme.Config['nav'] = [ - { text: "大学指南", - link: "/campus/readme.md" +const nav = [ + { + text: "大学指南", + link: "/campus/", }, { text: "Fashion", - link: "/fashion/readme.md" + link: "/fashion/", }, { text: "贡献指南", - items: [ - { text: "校园版块投稿指南", link: "/contributor-guide/campus.md" }, - { text: "其他投稿指南", link: "/contributor-guide/other.md" }, - { text: "校园版块贡献模板", link: "/contributor-guide/CampusTemplate.md" }, - ], + items: [{ + text: "校园版块投稿指南", + link: "/contributor-guide/campus.md", + }, { + text: "其他投稿指南", + link: "/contributor-guide/other.md", + }, { + text: "校园版块贡献模板", + link: "/contributor-guide/CampusTemplate.md", + }], }, -]; +] satisfies DefaultTheme.Config['nav']; +export default nav; diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 52ccee5..0000000 --- a/docs/README.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -home: true -icon: home -heroText: RLE.wiki -tagline: 欢迎大家来到 RLE.wiki。这里会给跨性别者们提供一份 RLE 指南。部分内容由 MtF.wiki 迁移而来,更多帮助正在路上,敬请期待。 -actions: - - text: 大学指南 🏫 - link: /campus/ - type: primary - - text: Fashion 👕 - link: /fashion/ - type: primary - - text: 防护 🚨 - link: /personal-safety/ - type: primary - - text: 新版网站 🚧 - link: https://next.rle.wiki/ -footer: Creative Commons BY-SA 4.0 | Copyright © 2022-present Project Trans ---- - -::: info 重要大事宣布 -🚧 [新版 RLE.wiki 网站](https://next.rle.wiki/) 测试中,欢迎大家访问体验 -::: - -::: info 本项目由 Project Trans 团队发起,包括但不仅限于 MtF 的 RLE 指导,也欢迎广大 FtM 同胞一起建设本项目。 -::: - -::: info 本项目包括且不仅限于校园指南,后期会包括其他 RLE 指导,处于建设初期其他条目暂未完成,欢迎大家帮助项目完善。 -::: - -::: note 🕯 沉痛悼念原 RLE-wiki 核心维护人员 ArtsEpiphany 🕯 R.I.P 2023.3.13 🕯 -::: diff --git a/docs/assets/CSU_BILL.jpg b/docs/assets/CSU_BILL.jpg new file mode 100644 index 0000000..6d3fdd3 Binary files /dev/null and b/docs/assets/CSU_BILL.jpg differ diff --git a/docs/campus/CAU.md b/docs/campus/CAU.md index 982a7ad..9c38204 100644 --- a/docs/campus/CAU.md +++ b/docs/campus/CAU.md @@ -89,7 +89,7 @@ author: @@ -27,7 +27,7 @@ author: ## 地理位置及交通 - @@ -69,7 +69,7 @@ author: ## 宿舍情况与基础设施 - @@ -101,7 +101,7 @@ author: ## LGBT 友善梗概 - @@ -121,7 +121,7 @@ author: ### 院系探路 - @@ -129,7 +129,7 @@ author: diff --git a/docs/campus/README.md b/docs/campus/index.md similarity index 100% rename from docs/campus/README.md rename to docs/campus/index.md diff --git a/docs/contributor-guide/CampusTemplate.md b/docs/contributor-guide/CampusTemplate.md index e530eb6..a3a6a4f 100644 --- a/docs/contributor-guide/CampusTemplate.md +++ b/docs/contributor-guide/CampusTemplate.md @@ -20,7 +20,7 @@ order: 2 | 医保使用 | ✓ | | | 校医院服务 | ✗ | | -:::note +::: info 此表格为介绍学校的基本情况,如果没有或者不想写的话可以去掉。 其中情况如果是正面的或者表示确认使用符号`✓` @@ -36,7 +36,7 @@ order: 2 ## 概述 -::: note +::: info 概况部分应包含学校的中文全称、英文全程、英文缩写、官网地址,使用 `[中文全称](官网地址)(英文全称, 英文缩写)` 的格式。接下来可以简单陈述学校的整体情况,例如设置有哪些学科,是否为双一流学校等等。 ::: @@ -44,7 +44,7 @@ order: 2 ## 地理位置及交通 -::: note +::: info 这一部分应当以校区名称位于 `[通讯地址](高德地图 POI 链接)` 的形式开头。在此应该阐明哪些学生将会进入哪个校区,是按年级分配校区还是按专业分配校区等等。如果某个校区离市区很远,或者交通不便,应当指出。 如果学校设有多个校区,在接下来的内容中,请注意你所陈述的是否是所有校区的普遍情况。如果你只了解自己所在的校区的情况,而对其他校区并不了解,应当指出。 @@ -56,7 +56,7 @@ order: 2 ## 军训与体育 -::: note +::: info 军训部分重点关注:军训是否强制要求剪短头发,军训的时长、强度,军训能否免训或半训等等;体育部分重点关注:体育课是否男女分开,体育课强度、考核难度,是否可以申请降低标准等等。 此部分可以像下面的例子一样分段写,也可以合并为同一个正文。 @@ -72,7 +72,7 @@ order: 2 #### 体测 -::: note +::: info 因为考虑到跨性别群体进行的 HRT 治疗可能会影响到体力,且一些学校对于体测较为严格,因此体测部分应当记录详细的体测政策和执行标准。 ::: @@ -80,7 +80,7 @@ order: 2 ## 宿舍情况与基础设施 -::: note +::: info 宿舍情况重点关注:寝室环境、是否有独立卫浴,是否可以申请调换寝室乃至于单人居住,是否可以校外租房居住等等;基础设施部分重点关注:学校各处是否有第三卫生间。 如果有多个校区且实施的政策不一样,应特别指出。 @@ -92,7 +92,7 @@ order: 2 ## 医疗资源 -::: note +::: info 医疗资源部分包括:校医院能否开具激素检查,能否公费或医保购买 HRT 药物;如果不能,校外的医院能否进行检查与开具药物,能否回校报销,前往校外医院与报销是否方便等等。 ::: @@ -100,7 +100,7 @@ order: 2 ## LGBT 友善梗概 -::: note +::: info 如果不利于跨性别生存请特别指出 这里可以写一些主观感受,如学校、教师、同学是否对 LGBT 友善等,客观内容包括学校是否有 LGBT 专门的社团组织,是否提供 LGBT 的科普等。大部分学校都有提供心理咨询服务,如有心理咨询的经历,可以讲述心理咨询是否跨性别友善、预约是否容易等等。 @@ -112,7 +112,7 @@ order: 2 ### 跨性别分布情况 -::: note +::: info 对于该校现存跨性别数量不需要特别指出(考虑到时效性问题) ::: @@ -120,7 +120,7 @@ order: 2 ### 院系探路 -::: note +::: info 由于不同院系之间可能差异较大,所以可以在这里写下你所在的院系氛围如何,院系老师、同学是否跨性别友善等等。 ::: @@ -128,7 +128,7 @@ order: 2 ## 其他信息 -::: note +::: info 如果你认为还有其他需要放在 Wiki 上的内容,可以填写在这个小节中,如果有必要,可以单独添加小标题来分段。 ::: @@ -138,7 +138,7 @@ order: 2 ## 投稿人联系方式 -::: note +::: info 如果你愿意,可以进行署名,这需要你在文件头部的 `author` 处添加,并将您的署名添加在下方的小标题中。如果不希望署名,应当修改`author`为`匿名`,并注释掉「投稿人联系方式」示例小标题。 为了避免不必要的麻烦,如果有多位贡献者且希望署名,请在署名处添加 `等` 字样,来说明该页面可能也包含了其他人的贡献。你还可以在页面末尾留下你的联系方式,如邮箱等,方便学校的其他跨性别或是有意向报考你的学校的跨性别联系你。你也可以以私聊的形式和他们交流学校的更多情况。 @@ -146,7 +146,7 @@ order: 2 ### 贡献者姓名 -::: note +::: info 请考虑联络方式的未来可用性 ::: diff --git a/docs/fashion/README.md b/docs/fashion/index.md similarity index 100% rename from docs/fashion/README.md rename to docs/fashion/index.md diff --git a/package.json b/package.json index 108dee2..732e733 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "name": "rle-wiki", "version": "1.0.0", "description": "RLE指北", - "license": "Creative Commons BY-SA 4.0", + "license": "CC-BY-SA-4.0", + "type": "module", "scripts": { "dev": "vitepress dev docs", "build": "vitepress build docs", @@ -14,9 +15,12 @@ }, "devDependencies": { "@types/markdown-it": "^13.0.7", - "@vuepress/client": "2.0.0-rc.0", + "@types/markdown-it-footnote": "^3.0.3", + "markdown-it-footnote": "^3.0.3", + "markdown-it-katex": "^2.0.3", "markdown-it-pangu": "^1.0.2", - "vitepress": "1.0.0-rc.31", + "vitepress": "^1.0.0-rc.31", + "vitepress-plugin-auto-sidebar": "^1.1.0", "vue": "^3.3.8", "vuepress": "2.0.0-rc.0", "vuepress-theme-hope": "2.0.0-rc.0"