xuos-web/README.md

72 lines
1.1 KiB
Markdown
Executable File

# XiUOS
> X IIoT Ubuquitous Operating System
## Development
XiUOS 网站开发
假定工作于Ubuntu环境.
XiUOS网站基于[VuePress](https://vuepress.vuejs.org), 故应先通过 *yarn* 安装 *vuepress* .
### 安装 yarn
首先
```bash
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
```
然后
```bash
sudo apt update && sudo apt install yarn
```
具体参见[这里](https://classic.yarnpkg.com/en/docs/install/#debian-stable)
### 安装vuepress
可以为所有项目安装全局的唯一 vuepress
```bash
yarn global add vuepress
```
也可以在vuepress 项目根目录下安装每个项目各自的vuepress
```bash
yarn add -D vuepress
```
### 下载网站源码
```bash
git clone https://github.com/xuos/xuos-web
```
如果没有全局vuepress, 需要安装
```bash
cd xuos-web
yarn add -D vuepress
```
测试
```bash
yarn dev
```
会在终端启动 web server, 浏览器中访问 http://localhost:8080, 可观察网站效果
运行
```bash
yarn build
```
可在 docs/.vuepress/dist 中生成编译后的html页面