Official website for OpenPitrix
git clone https://github.com/openpitrix/website.git
cd website
yarn
yarn dev
docker pull openpitrix/website
docker run -d --rm -p 80:80 --name op-website openpitrix/website
Tree of repo:
├── docs // docs root directory
│ ├── v0.3 // docs version
│ │ ├── en // docs language
│ │ │ └── installation // docs module
| | | └── installation-guide.md // document
│ │ └── zh-CN
│ │ └── installation
| | └── installation-guide.md
│ ├── toc_v0.3_en.json // table of contents, define the page navigation
│ └── toc_v0.3_zh-CN.json
├── src
└── static // put document images here
└── create-repo.png
If you want to edit the document, you can follow the ways below:
- Create a new directory called the new version name under the
docs
directory
cd docs && mkdir version-xxxx
- Create subdirectories for each language you want to support
cd docs/version-xxxx && mkdir -p zh-CN en
- Create navigation files for each language of the new version under the
docs
directory
cd docs
touch toc_version-xxx_en.json toc_version-xxx_zh-CN.json
navigation file example
- id: should match the format of
{version}-{language}
- chapters: nav items
- title: nav title
- entry: nav entry, path to the document to display
- entries: sub navs
{
"id": "v0.3-zh-CN",
"chapters": [
{
"title": "简介",
"entry": "./v0.3/zh-CN/introduction/basic.md"
},
{
"title": "安装指南",
"chapters": [
{
"title": "部署模式",
"entries": [
{
"entry": "./v0.3/zh-CN/installation/installation-guide.md"
},
{
"entry": "./v0.3/zh-CN/installation/allinone.md"
},
{
"entry": "./v0.3/zh-CN/installation/kubernetes.md"
}
]
}
]
}
]
}
document example
---
title: 'document title, will show in nav'
---
## title 1
content 1
![](/image.png)
this path will request `/static/image.png`
## title 2
### subtitle 2.1
content 2.1
### title 3
`##` will be transformed to an anchor of the page, and will show in the nav.
Apache 2