跑mvn compile -DskipTests -P compile-site -P download-site
当跑完 mvn generate-sources -DskipTests -P compile-site
, 所有的源文档都会复制到target/vue-source目录下
如果你想要调试:
# 在localhost:8080打开 npm run dev # 在.vuepress/dist生成项目文件(html形式) npm run build
请记住,Git只能记录site / src的更改。 目标文件夹中的所有更改将被Git忽略。
跑mvn compile scm-publish:publish-scm -P compile-site
.
Apache ID和密码是必须的
或直接运行mvn compile scm-publish:publish-scm -Dusername={你的Apache ID} -Dpassword={你的Apache账号密码} -P compile-site
在上传命令中增加 -Dscm-branch=asf-staging
, 则网站会被发布到 https://iotdb.staged.apache.org, 用于预览。
如果你在MacOS遇到以下问题:
gyp: No Xcode or CLT version detected!
然后,安装Xcode的CommandLine: sudo xcode-select --install
. 如果您已安装并且仍然出现错误,则 sudo xcode-select --reset
将组件放在.vuepress/components目录下
直接在md文件中使用<组件名/>即可
关于vue组件的使用教程https://cn.vuejs.org/v2/guide/components.html
head: [ ["meta", {name: "Description", content: "Apache IoTDB: Time Series Database for IoT"}], ["meta", {name: "Keywords", content: "TSDB, time series, time series database, IoTDB, IoT database, IoT data management,时序数据库, 时间序列管理, IoTDB, 物联网数据库, 实时数据库, 物联网数据管理, 物联网数据"}], ["meta", {name: "baidu-site-verification", content: "wfKETzB3OT"}], ["meta", {name: "google-site-verification", content: "mZWAoRY0yj_HAr-s47zHCGHzx5Ju-RVm5wDbPnwQYFo"}], ],
额外的需要被注入到当前页面的 HTML <head>
中的标签,每个标签都可以以 [tagName, { attrName: attrValue }, innerHTML?]
的格式指定
base:部署站点的基础路径,如果你想让你的网站部署到一个子路径下,你将需要设置它。
title:网站的标题,它将会被用作所有页面标题的前缀,同时,默认主题下,它将显示在导航栏(navbar)上
description:网站的描述,它将会以 <meta>
标签渲染到当前页面的 HTML 中。
具体配置信息看 https://www.vuepress.cn/config/
locales: { '/': { lang: 'en-US', // 将会被设置为 <html> 的 lang 属性 title: ' ', description: ' ' }, '/zh/': { lang: 'zh-CN', title: ' ', description: ' ' } },
表示/跳转英文链接,/zh/跳转中文链接。
文件的存储结构如下,zh下必须与英文的一一对应
docs ├─ Userguide ├─ SystemDesign ├─ Download │ └─ README.md ├─ etc. └─ zh ├─ Userguide ├─ SystemDesign └─ Download └─ README.md ├─ etc.
nav表示最顶端的导航栏,修改nav注意自己修改的中文还是英文版本
其中title表示该nav其中一项的标题,items就是下拉列表
nav: [ { text: 'Document', items: [ { text: 'In progress', link: '/UserGuide/master/0-Get Started/1-QuickStart' }, { text: 'V0.9.x', link: '/UserGuide/V0.9.x/0-Get Started/1-QuickStart' }, { text: 'V0.8.x', link: '/UserGuide/V0.8.x/0-Get Started/1-QuickStart'}, ] },
最前面的是跳转链接,children是补充该文档的跳转链接
总的链接就是 该网站域名+指定的语言版本(/或/zh/)+sidebar的链接+children的链接
sidebar: { 'sidebar的链接': [ { title:'sidebar的标题', collapsable: false,//这句表示默认不折叠,即一直保持打开状态 children: [ 'children的链接1', 'children的链接2', 'children的链接3' ] },
关于sidebar其他属性配置,见vuepress教程https://www.vuepress.cn/zh/theme/default-theme-config.html#%E4%BE%A7%E8%BE%B9%E6%A0%8F
如果觉得找到in progress较为麻烦,直接ctrl+F搜索**/UserGuide/master/跳转到那一块,中文是/zh/UserGuide/master/**
sidebar: { '/UserGuide/master/': [ { title:'User Guide(In progress)', collapsable: false, }, { title: '0-Get Started', children: [ '0-Get Started/1-QuickStart', '0-Get Started/2-Frequently asked questions', '0-Get Started/3-Publication' ] },