Skip to content
OpenPitrix official website
Branch: master
Clone or download
FeynmanZhou Merge pull request #125 from shaowenchen/fix-broken-links
fix broken links in installation-guide and introduction
Latest commit 387e3b1 Jul 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
blogs feat: Add blogs (#90) Apr 11, 2019
docs fix broken links in installation-guide and introduction Jul 15, 2019
plugins/gatsby-remark-format first commit Aug 16, 2018
src fix: Font wrap in the home page on windows chrome (#122) Jul 11, 2019
static feat: Support PWA (#114) Jun 27, 2019
.dockerignore feat: build gatsbyjs in docker Aug 20, 2018
.env.development feat: Add disqus comment for blog detail page (#106) Jun 21, 2019
.env.production feat: Add disqus comment for blog detail page (#106) Jun 21, 2019
.eslintrc feat: New home and install page (#72) Feb 28, 2019
.gitignore first commit Aug 16, 2018
.npmrc chore: Add yarn lockfile, fix npmrc Nov 28, 2018
.prettierrc first commit Aug 16, 2018
.travis.yml chore: Rename content to docs, change ci build (#76) Feb 28, 2019
CNAME chore: Rename content to docs, change ci build (#76) Feb 28, 2019
Dockerfile refactor: Docker build (#73) Feb 28, 2019
LICENSE first commit Aug 16, 2018
README.md refactor: Readme add docker run tips (#77) Mar 1, 2019
api-doc-options.js chore: Api page using ssr (#119) Jul 11, 2019
api.swagger.json feat: Api docs (#101) Jun 21, 2019
docker_push.sh chore: Rename content to docs, change ci build (#76) Feb 28, 2019
gatsby-config.js chore: Api page using ssr (#119) Jul 11, 2019
gatsby-node.js chore: Api page using ssr (#119) Jul 11, 2019
google74530a4e50adcf99.html update google search index Oct 20, 2018
package.json chore: Upgrade lodash to latest, prevent severity issue (#121) Jul 11, 2019
yarn.lock

README.md

Official website for OpenPitrix

Build Status docker build

Develop

git clone https://github.com/openpitrix/website.git
cd website
yarn
yarn dev

Run

docker pull openpitrix/website
docker run -d --rm -p 80:80 --name op-website openpitrix/website

Contribute

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:

Add new version

  1. Create a new directory called the new version name under the docs directory
cd docs && mkdir version-xxxx
  1. Create subdirectories for each language you want to support
cd docs/version-xxxx && mkdir -p zh-CN en
  1. 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

Edit navigation

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"
            }
          ]
        }
      ]
    }
  ]
}

Edit Document

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.

License

Apache 2

You can’t perform that action at this time.