Skip to content

Commit

Permalink
Simplify, back to basics for DocumenterVitepress
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Sep 3, 2024
1 parent d29303b commit 0d8f74f
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 737 deletions.
52 changes: 0 additions & 52 deletions docs/literate/custom.jl

This file was deleted.

149 changes: 0 additions & 149 deletions docs/literate/isin.jl

This file was deleted.

61 changes: 25 additions & 36 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,53 +1,40 @@
using Documenter
using DocumenterVitepress
using GeoRegions
using CairoMakie
using Literate

using CairoMakie # to avoid capturing precompilation output by Literate
CairoMakie.activate!(type = "svg")

pages_using = [
"Is it in a GeoRegion?" => "isin",
"Custom GeoRegions" => "custom",
]
DocMeta.setdocmeta!(GeoRegions, :DocTestSetup, :(using GeoRegions); recursive=true)

const DIR_LIT = joinpath(@__DIR__, "literate")
const DIR_USING = joinpath(@__DIR__, "src/using")
# pages_using = [
# "Is it in a GeoRegion?" => "isin",
# "Custom GeoRegions" => "custom",
# ]

scripts_using = [ filename * ".jl" for (title, filename) in pages_using ]
# const DIR_LIT = joinpath(@__DIR__, "literate")
# const DIR_USING = joinpath(@__DIR__, "src/using")

for scripts in scripts_using
scripts_filepath = joinpath(DIR_LIT, scripts)
Literate.markdown(scripts_filepath, DIR_USING; flavor = Literate.DocumenterFlavor())
end
# scripts_using = [ filename * ".jl" for (title, filename) in pages_using ]

# for scripts in scripts_using
# scripts_filepath = joinpath(DIR_LIT, scripts)
# Literate.markdown(scripts_filepath, DIR_USING; flavor = Literate.DocumenterFlavor())
# end

makedocs(
makedocs(;
modules = [GeoRegions],
authors = "Nathanael Wong <[email protected]>",
sitename = "GeoRegions.jl",
doctest = false,
warnonly = true,
format = DocumenterVitepress.MarkdownVitepress(
repo = "https://github.com/GeoRegionsEcosystem/GeoRegions.jl",
devurl = "dev",
),
authors = "Nathanael Wong",
sitename = "GeoRegions.jl",
pages = [
"Home" => "index.md",
"GeoRegions" => [
"What is a GeoRegion?" => "georegions/intro.md",
"Creating GeoRegions" => "georegions/create.md",
"Predefined GeoRegions" => "georegions/predefined.md",
"Retrieving GeoRegions" => "georegions/read.md",
],
"Tutorials" => [
"Is it in a GeoRegion?" => "using/isin.md",
"Custom GeoRegions" => "using/custom.md",
],
"Custom Lists" => [
"API" => "lists/api.md",
"Default" => "lists/default.md",
],
]
pages=[
"Home" => "index.md",
],
)

recursive_find(directory, pattern) =
Expand All @@ -64,7 +51,9 @@ for file in files
rm(file)
end

deploydocs(
repo = "github.com/GeoRegionsEcosystem/GeoRegions.jl.git",
devbranch = "main"
deploydocs(;
repo = "github.com/GeoRegionsEcosystem/GeoRegions.jl.git",
target = "build", # this is where Vitepress stores its output
devbranch = "main",
branch = "gh-pages",
)
18 changes: 0 additions & 18 deletions docs/package.json

This file was deleted.

48 changes: 0 additions & 48 deletions docs/src/.vitepress/config.mts

This file was deleted.

19 changes: 0 additions & 19 deletions docs/src/.vitepress/theme/index.ts

This file was deleted.

Loading

0 comments on commit 0d8f74f

Please sign in to comment.