Unverified Commit 8832e1df authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

comb down the literal notebook generation

I hope this will work at least for local docs build (see no reason not to).

Links might deserve some checking.
parent 2326989b
......@@ -29,7 +29,6 @@ temp.*
# Ignore jupyter notebook stuff
.ipynb_checkpoints
# add tutorials specififcs
docs/src/generated/
*.ipynb
# add generated tutorial specifics
docs/src/notebooks/*.md
docs/src/notebooks/*.ipynb
......@@ -4,22 +4,25 @@ using Literate
ENV["TRAVIS_REPO_SLUG"] = "LCSB-BioCore/COBREXA.jl"
# generate notebooks
EXAMPLE = joinpath(@__DIR__, "src/notebooks", "example.jl")
OUTPUT = joinpath(@__DIR__, "src/tutorials")
notebooks_path=joinpath(@__DIR__, "src", "notebooks-src")
notebooks = joinpath.(notebooks_path, readdir(notebooks_path))
notebooks_outdir = joinpath(@__DIR__, "src", "notebooks")
folder = "stable"
## only temporary - will be removed once public
branch = "gh-pages"
Literate.markdown(
EXAMPLE,
OUTPUT;
for notebook in notebooks
Literate.markdown(
notebook,
notebooks_outdir;
repo_root_url = "https://github.com/$(ENV["TRAVIS_REPO_SLUG"])/blob/master",
nbviewer_root_url = "https://nbviewer.jupyter.org/github/$(ENV["TRAVIS_REPO_SLUG"])/blob/gh-pages/$(folder)",
binder_root_url = "https://mybinder.org/v2/gh/$(ENV["TRAVIS_REPO_SLUG"])/$(branch)?filepath=$(folder)",
)
Literate.notebook(EXAMPLE, OUTPUT)
)
Literate.notebook(notebook, notebooks_outdir)
end
makedocs(
......@@ -37,6 +40,7 @@ makedocs(
pages = [
"Home" => "index.md",
"Tutorials" => "tutorials.md",
"Examples and notebooks" => "notebooks.md",
"Function reference" => "functions.md",
"How to contribute" => "howToContribute.md",
],
......
......@@ -70,8 +70,19 @@ Dict{String,Float64} with 95 entries:
## Tutorials
Detailed tutorial contents is [available here](tutorials.md).
```@contents
Pages = joinpath.("tutorials", readdir("tutorials"))
Depth = 1
```
## Example notebooks and workflows
Detailed notebook content is [available here](notebooks.md).
```@contents
Pages = readdir("tutorials")
Pages = joinpath.("notebooks", readdir("notebooks"))
Depth = 1
```
......@@ -83,8 +94,4 @@ Pages = ["functions.md"]
## Contribution guide
If you want to contribute, please read these guidelines first:
```@contents
Pages = ["howToContribute.md"]
```
If you want to contribute, please read [the contribution guidelines and hints](howToContribute.md).
# COBREXA Tutorials
```@contents
Pages = joinpath.("tutorials", readdir("tutorials"))
Depth = 2
```
# Loading and converting models
This is a test.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment