Skip to content

Commit

Permalink
Update Documenter to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle authored Oct 21, 2024
1 parent 655ca3c commit 1a84eae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/Manifest.toml
docs/build/
.vscode/settings.json
docs/src/tutorial/*.md
docs/src/tutorial/*.md
docs/Manifest.toml
3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
MetaGraphs = "626554b9-1ddb-594c-aa3c-2596fe9399a5"
MetaGraphsNext = "fa8bd995-216d-47f1-8a91-f3b68fbeb377"

[compat]
Documenter = "1"
29 changes: 3 additions & 26 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,19 @@ for file in readdir(TUTORIAL_DIR_JL)
)
end

function markdown_title(path)
title = "?"
open(path, "r") do file
for line in eachline(file)
if startswith(line, '#')
title = strip(line, [' ', '#'])
break
end
end
end
return String(title)
end

pages = [
"Home" => "index.md",
"Tutorial" => [
markdown_title(joinpath(TUTORIAL_DIR_MD, file)) => joinpath("tutorial", file)
for file in sort(readdir(TUTORIAL_DIR_MD)) if endswith(file, ".md")
joinpath("tutorial", file) for file in sort(readdir(TUTORIAL_DIR_MD)) if endswith(file, ".md")
],
"API reference" => "api.md",
]

makedocs(;
sitename="MetaGraphsNext.jl",
modules=[MetaGraphsNext],
doctest=true,
pages=pages,
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://juliagraphs.org/MetaGraphsNext.jl/dev/",
assets=String[],
edit_link=:commit,
),
checkdocs=:all,
linkcheck=true,
strict=true,
format=Documenter.HTML(),
)

deploydocs(; repo="github.com/JuliaGraphs/MetaGraphsNext.jl.git")
deploydocs(; repo="github.com/JuliaGraphs/MetaGraphsNext.jl")

0 comments on commit 1a84eae

Please sign in to comment.