Skip to content

Commit 6a661ee

Browse files
Merge pull request #238 from KULeuvenNeuromechanics/Documentation-update
Create website
2 parents e520c1f + b7a22fd commit 6a661ee

File tree

10 files changed

+178
-1
lines changed

10 files changed

+178
-1
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build Sphinx website
2+
# Builds the website when a pull request is made. The website files
3+
# can be downloaded from the github actions tab to be reviewed locally.
4+
5+
on:
6+
pull_request:
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.x"
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r Documentation/requirements.txt
27+
28+
- name: Build Sphinx documentation
29+
run: |
30+
sphinx-build -M html Documentation/source/ Documentation/build/
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: './Documentation/build/html'

.github/workflows/deploy.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy Sphinx to GitHub Pages
2+
# Builds the website and deploys the updates online when the master branch is updated.
3+
4+
on:
5+
push:
6+
branches: ["master"]
7+
#release:
8+
# types: [published]
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
jobs:
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: "3.x"
39+
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
pip install -r Documentation/requirements.txt
44+
45+
- name: Build Sphinx documentation
46+
run: |
47+
sphinx-build -M html Documentation/source/ Documentation/build/
48+
49+
- name: Setup Pages
50+
uses: actions/configure-pages@v5
51+
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: './Documentation/build/html'
56+
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
*.sto
55
*.log
66
*.png
7-
!/Documentation/FiguresForDocumentation/*.png
87
*.jpg
98
*.eps
109

10+
!/Documentation/source/_static/*.png
11+
12+
Documentation/build/*
1113
Debug/*
1214
opensimAD/*
1315
Examples/ExampleResults
1416
App
17+
18+
1519
Subjects/*
1620
!Subjects/README.md
1721

Documentation/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sphinx
2+
sphinx-autobuild
3+
myst-parser
149 KB
Loading
89.6 KB
Loading
508 KB
Loading
525 KB
Loading

Documentation/source/conf.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
# -- Project information -----------------------------------------------------
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
9+
project = 'PredSim'
10+
copyright = "%Y, KU Leuven Neuromechanics"
11+
author = "Lars D'Hondt"
12+
github_username = 'KULeuvenNeuromechanics'
13+
github_repository = 'https://github.com/KULeuvenNeuromechanics/PredSim'
14+
15+
# -- General configuration ---------------------------------------------------
16+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
17+
18+
extensions = ['myst_parser']
19+
source_suffix = {
20+
'.rst': 'restructuredtext',
21+
'.txt': 'markdown',
22+
'.md': 'markdown',
23+
}
24+
25+
templates_path = ['_templates']
26+
exclude_patterns = []
27+
28+
29+
30+
# -- Options for HTML output -------------------------------------------------
31+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
32+
33+
#html_theme = 'alabaster'
34+
html_theme_options = {
35+
'fixed_sidebar': 'true',
36+
'globaltoc_maxdepth': '3',
37+
'sidebar_collapse': 'false',
38+
'sidebar_width': '250px',
39+
'page_width': '90%',
40+
'github_user': 'KULeuvenNeuromechanics',
41+
'github_repo': 'PredSim',
42+
#'github_banner': 'true',
43+
#'github_button': 'true',
44+
}
45+
46+
html_sidebars = {
47+
#'**': ['navigation.html', 'searchfield.html'],
48+
#'**': ['searchbox.html','globaltoc.html'],
49+
'**': ['searchfield.html','globaltoc.html'],
50+
}
51+
52+
html_static_path = ['_static']
53+
#html_logo = '_static/PredSimlogo_notext.png'
54+
html_logo = '_static/PredSimlogo_text.png'
55+
html_favicon = '_static/PredSimlogo_notext (small).png'

Documentation/source/index.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
3+
Predictive Simulations of Locomotion
4+
====================================
5+
6+
This website is currently under construction.
7+
Please refer to the `readme`_ and `documentation`_ on github.
8+
9+
.. _readme: https://github.com/KULeuvenNeuromechanics/PredSim/blob/master/README.md
10+
.. _documentation: https://github.com/KULeuvenNeuromechanics/PredSim/tree/master/Documentation
11+
12+
Table of Contents
13+
-----------------
14+
15+
.. toctree::
16+
:maxdepth: 1
17+
:caption: Useful links
18+
19+
GitHub <https://github.com/KULeuvenNeuromechanics/PredSim>
20+
User forum <https://github.com/KULeuvenNeuromechanics/PredSim/discussions>
21+

0 commit comments

Comments
 (0)