Skip to content

Commit 36785ca

Browse files
authored
refactor: use hugo to build website (#132)
1 parent 8368f0d commit 36785ca

File tree

165 files changed

+999
-992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+999
-992
lines changed

.github/workflows/deploy.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
push:
66
branches:
77
- main
8-
pull_request:
98

109
# Allow one concurrent deployment
1110
concurrency:
@@ -19,13 +18,26 @@ jobs:
1918
- uses: actions/checkout@v4
2019
with:
2120
fetch-depth: 0
22-
- run: make install
21+
- name: Setup Hugo
22+
uses: peaceiris/actions-hugo@v3
23+
with:
24+
hugo-version: 'latest'
25+
extended: true
26+
- name: Build with Hugo
27+
env:
28+
# For maximum backward compatibility with Hugo modules
29+
HUGO_ENVIRONMENT: production
30+
HUGO_ENV: production
31+
run: |
32+
npm i -D postcss postcss-cli autoprefixer
33+
hugo mod get
34+
hugo --minify
2335
- run: make build
24-
# copy .asf.yaml to docs/book/html which asf site needs
25-
- run: cp .asf.yaml docs/book/html
36+
# copy .asf.yaml to ./public, asf site needs it.
37+
- run: cp .asf.yaml ./public
2638
- uses: peaceiris/actions-gh-pages@v3
2739
if: github.event_name != 'pull_request'
2840
with:
2941
github_token: ${{ secrets.GITHUB_TOKEN }}
30-
publish_dir: ./docs/book/html
42+
publish_dir: ./public
3143
publish_branch: asf-site

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@
66

77
# vscode files
88
.vscode
9+
10+
/resources
11+
*lock
12+
/public
13+
/node_modules
14+
package.json
15+
package-lock.json

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
install:
2-
cargo install mdbook@0.4.25
3-
cargo install mdbook-i18n --git https://github.com/chunshao90/mdbook-i18n.git --rev ca497cff369e0a5cedcd4024af6e1f05cc5050c5
2+
brew install hugo
43

54
serve:
6-
cd docs && mdbook serve
7-
8-
build:
9-
cd docs && mdbook build
5+
hugo serve
106

117
lint:
128
find . -name '*.md' | xargs npx prettier@2.7.1 --write

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,25 @@
66
>
77
> Please read the [DISCLAIMER](DISCLAIMER) and a full explanation of ["incubating"](https://incubator.apache.org/policy/incubation.html).
88
9-
This repository stores all the source files of [HoraeDB docs website](https://apache.github.io/incubator-horaedb-docs/), the website is generated with [mdbook](https://rust-lang.github.io/mdBook/).
9+
This repository stores all the source files of [HoraeDB docs website](https://apache.github.io/horaedb-docs/), the website is generated with [hugo](https://gohugo.io/) and [docsy](https://www.docsy.dev/).
1010

1111
**All files are written in standard markdown.**
1212

13+
## How to run
14+
15+
```bash
16+
# Download dependencies
17+
hugo mod get
18+
19+
# Start a local server for preview
20+
hugo serve
21+
```
22+
23+
By default hugo will listen on http://localhost:1313
24+
1325
## Contributing
1426

1527
Welcome any contributions from the community. You can
1628

17-
- Open an [issue](https://github.com/apache/incubator-horaedb-docs/issues) with any suggestions, or
18-
- Submit a [pull request](https://github.com/apache/incubator-horaedb-docs/pulls) to improve the website (trivial fixes are welcome).
29+
- Open an [issue](https://github.com/apache/horaedb-docs/issues) with any suggestions, or
30+
- Submit a [pull request](https://github.com/apache/horaedb-docs/pulls) to improve the website (trivial fixes are welcome).

archetypes/default.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+++
2+
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
3+
date = {{ .Date }}
4+
draft = true
5+
+++

content/cn/_index.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: "Horaedb"
3+
---
4+
5+
{{% blocks/cover color="primary" title="Apache HoraeDB™ (incubating)" height="full" %}}
6+
{{% param description %}}
7+
8+
{.display-6}
9+
10+
<a class="btn btn-lg btn-secondary" href="https://github.com/apache/horaedb">GitHub<i class="fab fa-github ms-2 "></i></a>
11+
<a class="btn btn-lg btn-secondary" href="docs/getting-started/">
12+
快速开始<i class="fas fa-arrow-alt-circle-right ms-2"></i>
13+
</a>
14+
{.p-initial .my-5}
15+
16+
{{% blocks/section type="row" %}}
17+
18+
{{% blocks/feature icon="fa-lightbulb" title="特性" %}}
19+
高性能低成本、简单易用、社区驱动
20+
21+
{{% /blocks/feature %}}
22+
23+
{{% blocks/feature icon="fa fa-code" title="生态" url="docs/user-guide/ecosystem/" %}}
24+
25+
积极拥抱开源生态,同时能够无缝对接各种开源组件。
26+
{{% /blocks/feature %}}
27+
28+
{{% blocks/feature icon="fa-brands fa-github" title="100% 开源" url="/docs/contribution-guidelines/" %}}
29+
30+
所有代码均在 GitHub 上开源,欢迎新用户的加入!
31+
{{% /blocks/feature %}}
32+
33+
{{% /blocks/section %}}
34+
35+
{{% /blocks/cover %}}
Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
![HoraeDB](https://github.com/apache/incubator-horaedb/raw/main/docs/logo/horaedb-banner-white-small.jpg)
1+
---
2+
title: "文档"
3+
weight: 1
4+
menu:
5+
main:
6+
weight: 20
7+
pre: <i class='fa-solid fa-book'></i>
8+
---
9+
10+
![HoraeDB](/images/horaedb-banner-white-small.jpg)
211

312
![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)
4-
[![CI](https://github.com/apache/incubator-horaedb/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-horaedb/actions/workflows/ci.yml)
5-
[![OpenIssue](https://img.shields.io/github/issues/apachge/incubator-horaedb)](https://github.com/apache/incubator-horaedb/issues)
13+
[![CI](https://github.com/apache/horaedb/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/horaedb/actions/workflows/ci.yml)
14+
[![OpenIssue](https://img.shields.io/github/issues/apache/horaedb)](https://github.com/apache/horaedb/issues)
615

716
Apache HoraeDB™ (incubating) 是一款高性能、分布式的云原生时序数据库。
817

@@ -16,7 +25,7 @@ HoraeDB 的基础设计思想是采用混合存储格式和相应的查询方法
1625

1726
# 如何使用 HoraeDB?
1827

19-
- 查看 [快速开始](quick_start.md) 掌握快速使用 HoraeDB 的方式
20-
- HoraeDB 支持的数据模型请查看 [Data Model](sql/model/README.md)
21-
- SQL 使用相关请查看 [SQL](sql/README.md)
22-
- HoraeDB 支持的相关 SDK 请查看 [SDK](sdk/README.md)
28+
- 查看 [快速开始]({{< ref "getting-started.md" >}}) 掌握快速使用 HoraeDB 的方式
29+
- HoraeDB 支持的数据模型请查看 [Data Model]({{< ref "user-guide/sql/model/_index.md" >}})
30+
- SQL 使用相关请查看[这里]({{< ref "user-guide/sql/_index.md" >}})
31+
- SDK 使用请查看[这里]({{< ref "user-guide/sdk/_index.md" >}})

content/cn/docs/design/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "设计文档"
3+
weight: 40
4+
---
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# HoraeDB 架构介绍
1+
---
2+
title: "HoraeDB 架构介绍"
3+
weight: 10
4+
---
25

36
## 本文目标
47

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
注意:文章中提到的部分特性暂时还未实现。
1+
---
2+
title: "集群模式"
3+
weight: 20
4+
---
25

3-
# HoraeDB 集群
6+
注意:文章中提到的部分特性暂时还未实现。
47

58
## 整体架构
69

0 commit comments

Comments
 (0)