You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/).
20
19
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
26
23
27
24
# 簡介 (Introduction)
28
25
@@ -36,46 +33,26 @@ In these tutorials, we will explore basic knowledge of GMT and useful plotting s
需安裝 Jupyter Book 以及 sphinx-inline-tabs。前者可使用 ```conda``` 或 ```pip``` 安裝,後者可透過```pip```安裝。
40
37
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```..
42
39
43
40
```
44
-
$ conda install sphinx
41
+
$ pip install jupyter-book sphinx-inline-tabs
45
42
```
46
43
47
-
再來使用 ```pip``` 安裝剩下需要的模組:
44
+
開始編譯 HTML,在儲存庫根目錄下執行以下指令:
45
+
46
+
Start building HTML by running this command in the root path of this repository:
48
47
49
-
And then use ```pip``` to install the remaining necessary modules:
50
48
51
49
```
52
-
$ pip install sphinx_rtd_theme sphinx-intl
50
+
$ bash generate_html.bash
53
51
```
54
52
55
-
開始編譯 HTML:
56
-
57
-
Start building HTML:
53
+
編譯完成的 HTML 網頁會儲存在 `docs/_build/html/` 之中。
58
54
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/`.
0 commit comments