Skip to content

Commit fcdc211

Browse files
authored
Merge pull request #1 from kfrey-idm/kfrey_template
Template docs and workflows
2 parents 92bac6e + c32c724 commit fcdc211

File tree

13 files changed

+279
-0
lines changed

13 files changed

+279
-0
lines changed

.github/workflows/mkdocs_build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build docs
2+
3+
on:
4+
pull_request:
5+
branches: main
6+
7+
# Allows manual run from the Actions tab
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-docs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
- name: Setup python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.x"
20+
- name: Install packages
21+
run: |
22+
python3 -m pip install --upgrade pip
23+
python3 -m pip install .[docs]
24+
- name: Build static files
25+
run: |
26+
mkdocs build
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build docs and deploy to GH Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
paths:
8+
- 'mkdocs.yml'
9+
- 'docs/**'
10+
11+
# Allows manual run from the Actions tab
12+
workflow_dispatch:
13+
14+
jobs:
15+
build-docs:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v4
20+
- name: Setup python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.x"
24+
- name: Install packages
25+
run: |
26+
python3 -m pip install --upgrade pip
27+
python3 -m pip install .[docs]
28+
- name: Build static files
29+
run: |
30+
mkdocs build -d site
31+
- name: Upload static files as artifact
32+
id: deployment
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: site/
36+
37+
deploy-docs:
38+
runs-on: ubuntu-latest
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }} # Not used
42+
permissions:
43+
id-token: write
44+
pages: write
45+
needs: build-docs
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
uses: actions/deploy-pages@v4

docs/bib.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[emodpy]: https://docs.idmod.org/projects/emodpy/en/latest/index.html
2+
[idmtools]: https://docs.idmod.org/projects/idmtools/en/latest/index.html
3+
[emod-generic]: https://docs.idmod.org/projects/emod-generic/en/latest/parameter-overview.html
4+
[idmod]: https://www.idmod.org/
5+
[idm_pypi]: https://packages.idmod.org/

docs/customization/css/extra.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
div.md-copyright__highlight
2+
{
3+
display: flex;
4+
flex-direction: row;
5+
gap: 2em;
6+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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.startup.output.clearCache()
16+
MathJax.typesetClear()
17+
MathJax.texReset()
18+
MathJax.typesetPromise()
19+
})
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{# base partial from:
2+
github.com/squidfunk/mkdocs-material/material/templates/partials/copyright.html
3+
#}
4+
<div class="md-copyright">
5+
{% if config.copyright %}
6+
<div class="md-copyright__highlight">
7+
{{ config.copyright }}
8+
{% for link in config.extra.footer_links %}
9+
<a href="{{ link.href }}" target="_blank" rel="noopener" style="TEXT-DECORATION: underline">{{ link.text }}</a>
10+
{% endfor %}
11+
</div>
12+
{% endif %}
13+
{% if not config.extra.generator == false %}
14+
Made with
15+
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
16+
Material for MkDocs
17+
</a>
18+
{% endif %}
19+
</div>

docs/images/EMOD_logo.png

6.51 KB
Loading

docs/images/IDM_white.png

4.83 KB
Loading

docs/images/favicon.ico

5.3 KB
Binary file not shown.
59.1 KB
Loading

0 commit comments

Comments
 (0)