Skip to content

Commit d61c84b

Browse files
committed
Update README
1 parent 112f864 commit d61c84b

1 file changed

Lines changed: 17 additions & 40 deletions

File tree

README.md

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@
99

1010
# 有關於此儲存庫 (About This Repository)
1111

12-
這裡為「GMT 教學手冊」網站的文本檔 (包含文字、腳本、圖片),除了 README.md 之外,文檔皆以 *re***Structured***Text* 格式撰寫而成,再以 [Sphinx](http://www.sphinx-doc.org/en/stable/index.html) 編譯。
12+
這裡為「GMT 教學手冊」網站的文本檔 (包含文字、腳本、圖片),使用 *re***Structured***Text* 與 MyST 格式混合撰寫,以 [Jupyter Book](https://jupyterbook.org/) 編譯。
1313

14-
- `SOURCE_DOCS/xxx.rst`: 各章節文檔
15-
- `SOURCE_DOCS/locale/en/`: 英文翻譯檔
16-
- `SOURCE_DOCS/xxx/`: 各章節所需的圖片、輸入檔以及最終的 bash 腳本
17-
- `_build/`: 編譯過的文檔
14+
- `docs/`: 文檔設定、首頁、HTML 外觀調整與插入元件
15+
- `docs/main/`: 文檔內容
16+
- `docs/locale/`: 供翻譯作業的檔案
1817

19-
This repo hosts the source files (text, scripts, and images) of the website "GMT Tutorials". All the text (expect for the README.md itself) is in *re***Structured***Text* format and is built using [Sphinx](http://www.sphinx-doc.org/en/stable/index.html).
18+
This repo hosts the source files (text, scripts, and images) of the website "GMT Tutorials". The documents are in *re***Structured***Text* and MyST format and are built using [Jupyter Book](https://jupyterbook.org/).
2019

21-
22-
- `SOURCE_DOCS/xxx.rst`: text file for each chapter (webpage)
23-
- `SOURCE_DOCS/locale/en/`: English translation files
24-
- `SOURCE_DOCS/xxx/`: figures, sources for plotting, and the final bash script for each chapter
25-
- `_build/`: html documentation
20+
- `docs/`: documentation settings, index page, HTML appearances and plugins
21+
- `docs/main/`: main content
22+
- `docs/locale/`: files for translating into other languages
2623

2724
# 簡介 (Introduction)
2825

@@ -36,46 +33,26 @@ In these tutorials, we will explore basic knowledge of GMT and useful plotting s
3633

3734
# 編譯文本 (How to build the files to html)
3835

39-
首先需安裝 Sphinx。我推薦先安裝 [Anaconda](https://www.anaconda.com/products/individual),再使用 ```conda``` 指令安裝
36+
需安裝 Jupyter Book 以及 sphinx-inline-tabs。前者可使用 ```conda``````pip``` 安裝,後者可透過 ```pip``` 安裝
4037

41-
Firstly you will need Sphinx. I recommend installing [Anaconda](https://www.anaconda.com/products/individual) first and then installing Sphinx using the ```conda``` command.
38+
The documentation needs Jupyter Book and sphinx-inline-tabs to build. The former is available through ```conda``` or ```pip```, and the latter can be installed using ```pip```..
4239

4340
```
44-
$ conda install sphinx
41+
$ pip install jupyter-book sphinx-inline-tabs
4542
```
4643

47-
再來使用 ```pip``` 安裝剩下需要的模組:
44+
開始編譯 HTML,在儲存庫根目錄下執行以下指令:
45+
46+
Start building HTML by running this command in the root path of this repository:
4847

49-
And then use ```pip``` to install the remaining necessary modules:
5048

5149
```
52-
$ pip install sphinx_rtd_theme sphinx-intl
50+
$ bash generate_html.bash
5351
```
5452

55-
開始編譯 HTML:
56-
57-
Start building HTML:
53+
編譯完成的 HTML 網頁會儲存在 `docs/_build/html/` 之中。
5854

59-
60-
```
61-
# 前往 Makefile 所在資料夾,也就是根目錄
62-
# (Go to where the Makefile is located, which should be the root of this repo)
63-
# 編譯中文文本 (build Chinese html)
64-
make html
65-
# 文本會產生在 _build/html/ 底下 (html would be at _build/html/)
66-
67-
# 編譯英文文本 (make English html)
68-
make gettext
69-
sphinx-intl update -p _build/locale -l en
70-
# 前往 locale/en/ 翻譯文檔後... (Go to locate/en/ and translate them. After that...)
71-
make -e SPHINXOPTS="-D language='en'" BUILDSURFIX="/en" html
72-
# 文本會產生在 _build/html/en/ 底下 (html would at _build/html/en/)
73-
74-
# 修改 CSS 與添加額外的網頁設計 (Modify CSS and add more web design)
75-
bash decorate.bash
76-
77-
# 完成! (Finished!!)
78-
```
55+
The compiled HTML pages would be stored in `docs/_build/html/`.
7956

8057
# 授權 (License)
8158

0 commit comments

Comments
 (0)