跳至主要內容

修改配置

知识库编程技巧VUE应用VUE应用小于 1 分钟

配置文件说明

vuepress 相关

提示

详细说明见每个配置文件注释部分

  • docs/.vuepress/config.ts: 配置文件入口
  • docs/.vuepress/config/head.ts: 头部配置文件
  • docs/.vuepress/config/markdown.ts: MarkDown 配置文件
  • docs/.vuepress/config/nav.ts: Nav 配置文件
  • docs/.vuepress/config/plugins.ts: Plugins 配置文件
  • docs/.vuepress/config/themeVdoingConfig.ts: Vdoing 主题配置文件

小技巧

当需要切换主题时,不需要直接修改配置文件,可另外创建一个主题相关的配置文件 docs/.vuepress/config/themeXxxConfig.ts,在 config.ts 中修改

-- import themeConfig from "./config/themeVdoingConfig";
++ import themeConfig from "./config/themeXxxConfig.ts";

其他

注意

以下部分如无特殊说明,不需要修改

  • .npmrc: 包管理器相关配置文件,详见 configopen in new window
  • .editorconfig: 编辑器相关配置,详见 EditorConfigopen in new window
  • .gitignore: git 忽略文件列表
  • docs/.vuepress/public/CNAME: gh-page CNAME 文件,用于配置域名,需要根据实际情况修改

提示

如需修改镜像至国内源,修改 .npmrc 即可,不建议使用 cnpm

-- # registry=https://registry.npmmirror.com
++ registry=https://registry.npmmirror.com