Skip to content

Commit 5605cc2

Browse files
authored
Merge pull request #1 from Ceyron/main
Add Documentation with Mkdocs
2 parents 9e9db4e + dd538e7 commit 5605cc2

File tree

5 files changed

+144
-0
lines changed

5 files changed

+144
-0
lines changed

.github/workflows/build_docs.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
permissions:
6+
contents: write
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Configure Git Credentials
13+
run: |
14+
git config user.name github-actions[bot]
15+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: 3.x
19+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools
25+
bash install.sh
26+
python -m pip install -r docs/requirements.txt
27+
28+
- uses: actions/cache@v4
29+
with:
30+
key: mkdocs-material-${{ env.cache_id }}
31+
path: .cache
32+
restore-keys: |
33+
mkdocs-material-
34+
- run: pip install mkdocs-material
35+
- run: mkdocs gh-deploy --force

docs/index.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Getting Started
2+
3+
How to use ConvDO
4+
5+
### Here is an example API documentation
6+
7+
::: ConvDO.FieldOperations

docs/javascripts/mathjax.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
window.MathJax = {
2+
tex: {
3+
inlineMath: [["\\(", "\\)"]],
4+
displayMath: [["\\[", "\\]"]],
5+
processEscapes: true,
6+
processEnvironments: true
7+
},
8+
options: {
9+
ignoreHtmlClass: ".*|",
10+
processHtmlClass: "arithmatex"
11+
}
12+
};
13+
14+
document$.subscribe(() => {
15+
MathJax.typesetPromise()
16+
})

docs/requirements.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mkdocs==1.6.0
2+
black==24.4.2
3+
mkdocs-material==9.5.27
4+
mkdocstrings==0.25.1
5+
mkdocstrings-python==1.10.5
6+
mknotebooks==0.8.0

mkdocs.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
site_name: ConvDO
2+
site_description: Convolutional Differential Operators with PyTorch.
3+
site_author: Qiang Liu
4+
site_url: https://qiauil.github.io/ConvDO
5+
6+
repo_url: https://github.com/qiauil/ConvDO
7+
repo_name: qiail/ConvDO
8+
edit_uri: "" # No edit button, as some of our pages are in /docs and some in /examples via symlink, so it's impossible for them all to be accurate
9+
10+
theme:
11+
name: material
12+
features:
13+
- navigation.sections # Sections are included in the navigation on the left.
14+
- toc.integrate # Table of contents is integrated on the left; does not appear separately on the right.
15+
- header.autohide # header disappears as you scroll
16+
palette:
17+
- scheme: default
18+
primary: indigo
19+
accent: amber
20+
toggle:
21+
icon: material/weather-night
22+
name: Switch to dark mode
23+
- scheme: slate
24+
primary: indigo
25+
accent: amber
26+
toggle:
27+
icon: material/weather-sunny
28+
name: Switch to light mode
29+
icon:
30+
repo: fontawesome/brands/github # GitHub logo in top right
31+
32+
extra:
33+
social:
34+
- icon: fontawesome/brands/github
35+
link: https://github.com/qiauil
36+
37+
38+
strict: true # Don't allow warnings during the build process
39+
40+
markdown_extensions:
41+
- pymdownx.arithmatex: # Render LaTeX via MathJax
42+
generic: true
43+
- pymdownx.superfences # Seems to enable syntax highlighting when used with the Material theme.
44+
- pymdownx.details # Allowing hidden expandable regions denoted by ???
45+
- pymdownx.snippets: # Include one Markdown file into another
46+
base_path: docs
47+
- admonition
48+
- toc:
49+
permalink: "¤" # Adds a clickable permalink to each section heading
50+
toc_depth: 4
51+
- pymdownx.arithmatex:
52+
generic: true
53+
54+
extra_javascript:
55+
- javascripts/mathjax.js
56+
- https://polyfill.io/v3/polyfill.min.js?features=es6
57+
- https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js
58+
59+
plugins:
60+
- search # default search plugin; needs manually re-enabling when using any other plugins
61+
- autorefs # Cross-links to headings
62+
- mknotebooks # Jupyter notebooks
63+
- mkdocstrings:
64+
handlers:
65+
python:
66+
options:
67+
inherited_members: true # Allow looking up inherited methods
68+
show_root_heading: true # actually display anything at all...
69+
show_root_full_path: true # display full path
70+
show_if_no_docstring: true
71+
show_signature_annotations: true
72+
separate_signature: true
73+
show_source: true # don't include source code
74+
members_order: source # order methods according to their order of definition in the source code, not alphabetical order
75+
heading_level: 4
76+
show_symbol_type_heading: true
77+
docstring_style: null
78+
79+
nav:
80+
- 'index.md'

0 commit comments

Comments
 (0)