Skip to content

Commit 0a88764

Browse files
authored
更新Sphinx配置,添加myst_nb扩展及其版本要求 (deepmodeling#242)
* 更新Sphinx配置,添加myst_nb扩展及其版本要求 * Refactor code structure for improved readability and maintainability * 更新Sphinx配置,移除myst_parser并确保myst-nb包含所需功能 * 更新依赖项,移除myst-parser并添加linkify-it-py和myst-nb
1 parent f1eb2b9 commit 0a88764

File tree

5 files changed

+1306
-3
lines changed

5 files changed

+1306
-3
lines changed

.github/workflows/add_pages_doc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip
21-
pip install sphinx sphinx_book_theme myst-parser
21+
pip install sphinx sphinx_book_theme linkify-it-py
22+
pip install myst-nb jupyter
2223
# 安装deepmodeling_sphinx
2324
if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi
2425
- name: Build docs

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
3333
extensions = [
34-
'myst_parser',
34+
'myst_nb',
3535
'deepmodeling_sphinx',
3636
]
3737
myst_enable_extensions = [

docs/quick_start/hands_on/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ A quick Example
55
.. toctree::
66
sktb_hands_on
77
e3tb_hands_on
8+
tutorial1_base_sk

docs/quick_start/hands_on/tutorial1_base_sk.ipynb

Lines changed: 1299 additions & 0 deletions
Large diffs are not rendered by default.

docs/requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
urllib3 == 1.26.15
2-
myst_parser[linkify]
2+
# myst_parser[linkify] # 注释掉,因为myst-nb已包含myst_parser功能
3+
myst-nb[linkify]
34
sphinx_rtd_theme
45
sphinx-book-theme
56
deepmodeling_sphinx >= 0.1.2
7+
jupyter # 添加jupyter支持

0 commit comments

Comments
 (0)