Skip to content

Commit db77779

Browse files
Merge pull request #73 from EcoJulia/mdc/vitepress
switch docs to vitepress
2 parents ee688a8 + 8ead27c commit db77779

File tree

3 files changed

+23
-30
lines changed

3 files changed

+23
-30
lines changed

.github/workflows/Documentation.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ on:
1010

1111
jobs:
1212
build:
13-
name: "Build the documentation"
1413
runs-on: ubuntu-latest
1514
steps:
1615
- uses: actions/checkout@v2
1716
- uses: julia-actions/setup-julia@latest
1817
with:
19-
version: '1.9'
20-
- uses: julia-actions/julia-buildpkg@latest
18+
version: '1.11'
2119
- name: Install dependencies
2220
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
21+
env:
22+
GKSwstype: nul
2323
- name: Build and deploy
2424
env:
25-
GITHUB_TOKEN: ${{ secrets.TOKEN }} # For authentication with GitHub Actions token
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
GKSwstype: nul
2627
run: julia --project=docs/ docs/make.jl

docs/Project.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3-
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
3+
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
4+
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
5+
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
6+
NeutralLandscapes = "71847384-8354-4223-ac08-659a5128069f"
47
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

docs/make.jl

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,26 @@
1-
using Documenter, NeutralLandscapes
2-
import Literate
1+
push!(LOAD_PATH, "../src/")
32

4-
# For GR docs bug
5-
ENV["GKSwstype"] = "100"
6-
7-
vignettes = filter(
8-
endswith(".jl"),
9-
readdir(joinpath(@__DIR__, "src", "vignettes"); join = true, sort = true),
10-
)
11-
for vignette in vignettes
12-
Literate.markdown(
13-
vignette,
14-
joinpath(@__DIR__, "src", "vignettes");
15-
config = Dict("credit" => false, "execute" => true),
16-
)
17-
end
3+
using Documenter
4+
using DocumenterCitations
5+
using DocumenterVitepress
6+
using NeutralLandscapes
187

198
makedocs(;
20-
sitename = "NeutralLandscapes",
21-
authors = "M.D. Catchen",
22-
modules = [NeutralLandscapes],
23-
pages = [
9+
sitename="NeutralLandscapes",
10+
authors="M.D. Catchen",
11+
modules=[NeutralLandscapes],
12+
pages=[
2413
"Index" => "index.md",
2514
"Gallery" => "gallery.md",
26-
"Vignettes" => [
27-
"Overview" => "vignettes/overview.md",
28-
],
2915
],
30-
checkdocs = :all,
16+
format = DocumenterVitepress.MarkdownVitepress(
17+
repo="https://github.com/EcoJulia/NeutralLandscapes.jl",
18+
devurl="dev"
19+
),
20+
warnonly=true
3121
)
3222

3323
deploydocs(
3424
repo="github.com/EcoJulia/NeutralLandscapes.jl.git",
35-
devbranch="main",
3625
push_preview=true
3726
)

0 commit comments

Comments
 (0)