Skip to content
Snippets Groups Projects
Unverified Commit d8cc8a34 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane: Committed by GitHub
Browse files

Merge pull request #500 from LCSB-BioCore/mk-docfixes-4

docfixes
parents 4320c6db ea40a262
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@
[cov-url]: https://codecov.io/gh/LCSB-BioCore/COBREXA.jl
[contrib-img]: https://img.shields.io/badge/contributions-start%20here-green
[contrib-url]: https://lcsb-biocore.github.io/COBREXA.jl/dev/howToContribute/
[contrib-url]: https://lcsb-biocore.github.io/COBREXA.jl/stable/howToContribute/
[repostatus-url]: https://www.repostatus.org/#active
[repostatus-img]: https://www.repostatus.org/badges/latest/active.svg
......
......@@ -5,8 +5,15 @@ using COBREXA
# some settings
dev_docs_folder = "dev"
pages_branch = "gh-pages"
github_repo_slug = "LCSB-BioCore/COBREXA.jl"
delete!(ENV, "GITHUB_REPOSITORY")
# This must match the repo slug on github!
github_repo_slug = ENV["CI_PROJECT_NAMESPACE"] * "/" * ENV["CI_PROJECT_NAME"]
# Documenter tries to guess the repo slug from git remote URL but that doesn't
# work really well here, this is the only fallback. If this breaks, "Edit on
# GitHub" links will stop working. (See Documenter.jl source in
# src/Utilities/Utilities.jl, in November 2021 it was around line 500) -mk
ENV["TRAVIS_REPO_SLUG"] = github_repo_slug
# generate notebooks
notebooks_path = joinpath(@__DIR__, "src", "notebooks")
......@@ -15,8 +22,6 @@ notebooks_basenames = filter(x -> endswith(x, ".jl"), readdir(notebooks_path))
notebooks = joinpath.(notebooks_path, notebooks_basenames)
notebooks_outdir = joinpath(@__DIR__, "src", "notebooks")
for notebook in notebooks
Literate.markdown(
notebook,
......@@ -51,6 +56,7 @@ cp(
force = true,
)
# a helper for sourcing the documentation files from directories
find_mds(path) =
joinpath.(
Ref(path),
......@@ -73,20 +79,14 @@ makedocs(
pages = [
"Home" => "index.md",
"User guide" => [
"Quickstart tutorials" => vcat(
"Detailed tutorial listing" => "tutorials.md",
find_mds("tutorials"),
),
"Advanced tutorials" => vcat(
"Detailed tutorial listing" => "advanced.md",
find_mds("advanced"),
),
"Examples and notebooks" => vcat(
"Detailed notebook listing" => "notebooks.md",
find_mds("notebooks"),
),
"Quickstart tutorials" =>
vcat("All tutorials" => "tutorials.md", find_mds("tutorials")),
"Advanced tutorials" =>
vcat("All advanced tutorials" => "advanced.md", find_mds("advanced")),
"Examples and notebooks" =>
vcat("All notebooks" => "notebooks.md", find_mds("notebooks")),
],
"API reference" => vcat("Contents" => "functions.md", find_mds("functions")),
"Types and functions" => vcat("Contents" => "functions.md", find_mds("functions")),
"How to contribute" => "howToContribute.md",
],
)
......@@ -142,6 +142,5 @@ deploydocs(
repo = "github.com/$github_repo_slug.git",
target = "build",
branch = pages_branch,
push_preview = true,
devbranch = "develop",
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment