Skip to content

Commit cc085ff

Browse files
committed
Add Tutorials
1 parent f3ac55d commit cc085ff

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

docs/javascripts/extra.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ document.addEventListener("DOMContentLoaded", function() {
77
document.body.classList.add('document-is-notebook');
88
}
99
});
10+
11+
// Using the document$ observable from mkdocs-material to get notified of page "reload" also if using `navigation.instant` (SSA)
12+
// https://github.com/danielfrg/mkdocs-jupyter/issues/99#issuecomment-2455307893
13+
document$.subscribe(function() {
14+
// First check if the page contains a notebook-related class
15+
if (document.querySelector('.jp-Notebook')) {
16+
document.querySelector("div.md-sidebar.md-sidebar--primary").remove();
17+
}
18+
});

docs/tutorials/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Examples
2+
3+
Here are some tutorials.
4+
5+
- [`tutorial_pipt.ipynb`](pipt/tutorial_pipt): Tutorial for running PIPT
6+
- [`tutorial_pipt.ipynb`](popt/tutorial_popt): Tutorial for running POPT

docs/tutorials/pipt/tutorial_pipt.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"\n",
99
"<font size=4em>As an illustrative example we choose a small 3D-field with three producers and three (water) injectors. The figure below shows the true (data generating) permeability field and the well positions. The grid is 10x10x2, and the porosity is 0.2. The inverse problem is to find the permeability for the reservoir by assimilation produced water and oil and injected water. \n",
1010
"\n",
11-
"<img src=\"./permx.png?lastmod=12345678\" alt=\"drawing\" width=\"500\"/>\n",
11+
"<img src=\"../permx.png?lastmod=12345678\" alt=\"drawing\" width=\"500\"/>\n",
1212
"<br>\n",
1313
"<font size=4em>The first step is to load neccessary external and local modules. "
1414
]

docs/tutorials/popt/tutorial_popt.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"\n",
99
"<font size=4em>As an illustrative example we choose a 2D-field with one producer and two (water) injectors. The figure below shows the permeability field and the well positions. The grid is 100x100, and the porosity is 0.18. The optimization problem is to find the pressure control for the wells in order to maximize net present value. \n",
1010
"\n",
11-
"<img src=\"permx.png\" alt=\"drawing\" width=\"500\"/>\n",
11+
"<img src=\"../permx.png\" alt=\"drawing\" width=\"500\"/>\n",
1212
" \n",
1313
"<br>\n",
1414
"<font size=4em>The first step is to load neccessary external and local modules. "

mkdocs.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ watch: [.]
1010
nav:
1111
- Home: index.md
1212
- Reference: reference/
13-
# - Examples: examples/
13+
- Tutorials: tutorials/
1414
# - Bibliography: references.md
1515
- dev_guide.md
1616

@@ -64,11 +64,13 @@ plugins:
6464
- search
6565
- autorefs # enable anchor/heading links without specifying its page
6666
# - meta # [insiders only] enable front-matter defaults as in Jekyll
67-
# - mkdocs-jupyter:
68-
# include: ["*.ipynb"] # Default: ["*.py", "*.ipynb"]
69-
# ignore:
70-
# - ".ipynb_checkpoints/*"
71-
# execute: false
67+
- mkdocs-jupyter:
68+
include: ["*.ipynb"] # Default: ["*.py", "*.ipynb"]
69+
ignore:
70+
- ".ipynb_checkpoints/*"
71+
# show_input: False
72+
# no_input: True
73+
execute: false
7274
# - bibtex:
7375
# # NB: does not work with mkdocstrings (https://github.com/shyamd/mkdocs-bibtex/issues/246)
7476
# # PS: requires pandoc installed on system and markdown_extensions: footnotes

0 commit comments

Comments
 (0)