-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use mdbook to render book html
- Loading branch information
xiangfeng.xzc
committed
Mar 7, 2023
1 parent
46d1864
commit ce0d6fb
Showing
13 changed files
with
238 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Deploy Documentation | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "docs/**" | ||
- ".github/workflows/deploy-docs.yml" | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: docs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# https://github.com/marketplace/actions/mdbook-action | ||
- name: Setup mdBook | ||
uses: peaceiris/actions-mdbook@v1 | ||
with: | ||
mdbook-version: 'latest' | ||
- name: Build docs | ||
run: mdbook build ./docs/en && mdbook build ./docs/zh | ||
- name: Build agg | ||
run: mv ./docs/en/book ./docs/agg/en && mv ./docs/zh/book ./docs/agg/zh | ||
- name: Upload docs | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./docs/agg | ||
deploy-docs: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build-docs | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/.idea | ||
.DS_Store | ||
.DS_Store | ||
book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# README | ||
|
||
# Install mdBook | ||
|
||
Download mdBook from its [release page](https://github.com/rust-lang/mdBook/releases) and put it on your `$PATH`. | ||
|
||
Verify mdBook: | ||
```bash | ||
mdbook --version | ||
``` | ||
|
||
output: | ||
```text | ||
mdbook v0.4.26 | ||
``` | ||
|
||
Read [mdBook Documentation](https://rust-lang.github.io/mdBook/format/summary.html) | ||
|
||
# Write documentations | ||
|
||
Directory structure: | ||
```text | ||
docs/ | ||
en/ English translation | ||
src/ | ||
introduction/ | ||
introduction.md A documentation | ||
SUMMARY.md A markdown which generates the sidebar menu. Check the detail here https://rust-lang.github.io/mdBook/format/summary.html | ||
zh/ Chinese translation, has same directory structure as en/ | ||
``` | ||
|
||
The 'mdbook serve' command is used to preview a book by serving it via HTTP at `localhost:3000` by default: | ||
```bash | ||
mdbook serve ./docs/en | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# README | ||
|
||
# 安装 mdBook | ||
|
||
从 [release page](https://github.com/rust-lang/mdBook/releases) 下载 mdBook,并将其放置在 `$PATH` 下. | ||
|
||
验证 mdBook: | ||
```bash | ||
mdbook --version | ||
``` | ||
|
||
输出: | ||
```text | ||
mdbook v0.4.26 | ||
``` | ||
|
||
阅读 [mdBook 文档](https://rust-lang.github.io/mdBook/format/summary.html) | ||
|
||
# 编写文档 | ||
|
||
目录结构: | ||
```text | ||
docs/ | ||
en/ 英文翻译 | ||
src/ | ||
introduction/ | ||
introduction.md 一个文档 | ||
SUMMARY.md 一个 markdown 文档,用于生成侧边菜单栏. 详情请参考 mdBook 文档。 | ||
zh/ 中文翻译,与 en/ 有相同的目录结构。 | ||
``` | ||
|
||
使用 'mdbook serve' 命令在 `localhost:3000` 部署一个 HTTP 服务器用于预览渲染结果。 | ||
```bash | ||
mdbook serve ./docs/en | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>HoloInsight Documentations</title> | ||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | ||
<meta charset="UTF-8"> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="theme-color" content="#ffffff" /> | ||
</head> | ||
<body> | ||
<div> | ||
<ul> | ||
<li> | ||
<a href="en/">HoloInsight Documentations</a> | ||
</li> | ||
<li> | ||
<a href="zh/">HoloInsight 文档</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[book] | ||
title = "HoloInsight Documentations" | ||
authors = ["xzchaoo"] | ||
language = "en" | ||
src = "src" | ||
|
||
[build] | ||
create-missing = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Summary | ||
|
||
|
||
# Introduction | ||
- [What is HoloInsight](introduction/what-is-holoinsight.md) | ||
- [Quick Start]() | ||
|
||
|
||
# User Guide | ||
- [Page Layout]() | ||
- [Infrastructure monitoring]() | ||
- [Integrations]() | ||
- [Application monitoring]() | ||
- [Log monitoring]() | ||
- [Dashboard]() | ||
- [Dashboard]() | ||
- [Alert]() | ||
|
||
# Dev Guide | ||
- [Building]() | ||
- [Compile]() | ||
- [Build docker image]() | ||
- [Running]() | ||
- [Logging]() | ||
|
||
|
||
# Operations | ||
- [Deployment]() | ||
- [Standalone/All-in-one]() | ||
- [Microservice style]() | ||
- [Install Agent]() | ||
- [k8s]() | ||
- [Troubleshooting]() | ||
|
||
|
||
# Technical and Design | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# What is HoloInsight | ||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# User Guide | ||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[book] | ||
title = "HoloInsight 文档" | ||
authors = ["xzchaoo"] | ||
language = "zh" | ||
src = "src" | ||
|
||
[build] | ||
create-missing = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Summary | ||
|
||
|
||
# 介绍 | ||
- [什么是 HoloInsight](introduction/what-is-holoinsight.md) | ||
- [快速开始]() | ||
|
||
|
||
# 用户指南 | ||
|
||
|
||
# 开发指南 | ||
- [构建]() | ||
- [构建二进制]() | ||
- [构建 Docker 镜像]() | ||
- [运行]() | ||
- [日志]() | ||
|
||
|
||
# 运维 | ||
- [部署]() | ||
- [Standalone/All-in-one]() | ||
- [微服务风格]() | ||
- [安装 Agent]() | ||
- [k8s]() | ||
- [问题排除]() | ||
|
||
|
||
# 技术架构 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# 什么是 HoloInsight | ||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# 用户指南 | ||
TODO |