Skip to content

Commit

Permalink
Clean up docs
Browse files Browse the repository at this point in the history
Remove some options that are set for default values.
Remove nice_name and let Documenter use the title of the page.
Remove link_check=false to make Documenter run the link checker.

Closes #357
  • Loading branch information
abelsiqueira committed Jul 13, 2024
1 parent 20f119e commit e5265e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 35 deletions.
20 changes: 3 additions & 17 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,16 @@ DocMeta.setdocmeta!(BestieTemplate, :DocTestSetup, :(using BestieTemplate); recu

const page_rename = Dict("developer.md" => "Developer docs") # Without the numbers

function nice_name(file)
file = replace(file, r"^[0-9]*-" => "")
if haskey(page_rename, file)
return page_rename[file]
end
return splitext(file)[1] |> x -> replace(x, "-" => " ") |> titlecase
end

makedocs(;
modules = [BestieTemplate],
doctest = true,
linkcheck = false, # Rely on Lint.yml/lychee for the links
authors = "Abel Soares Siqueira <[email protected]> and contributors",
repo = "https://github.com/abelsiqueira/BestieTemplate.jl/blob/{commit}{path}#{line}",
sitename = "BestieTemplate.jl",
format = Documenter.HTML(;
prettyurls = true,
canonical = "https://abelsiqueira.github.io/BestieTemplate.jl",
assets = ["assets/style.css"],
),
format = Documenter.HTML(; canonical = "https://abelsiqueira.github.io/BestieTemplate.jl"),
pages = [
"Home" => "index.md"
"index.md"
[
nice_name(file) => file for
file for
file in readdir(joinpath(@__DIR__, "src")) if file != "index.md" && splitext(file)[2] == ".md"
]
],
Expand Down
22 changes: 4 additions & 18 deletions template/docs/make.jl.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,19 @@ DocMeta.setdocmeta!({{ PackageName }}, :DocTestSetup, :(using {{ PackageName }})

const page_rename = Dict("developer.md" => "Developer docs") # Without the numbers

function nice_name(file)
file = replace(file, r"^[0-9]*-" => "")
if haskey(page_rename, file)
return page_rename[file]
end
return splitext(file)[1] |> x -> replace(x, "-" => " ") |> titlecase
end

makedocs(;
modules = [{{ PackageName }}],
doctest = true,
linkcheck = false, # Rely on Lint.yml/lychee for the links
authors = "{{ AuthorName }} <{{ AuthorEmail }}> and contributors",
repo = "https://github.com/{{ PackageOwner }}/{{ PackageName }}.jl/blob/{commit}{path}#{line}",
sitename = "{{ PackageName }}.jl",
format = Documenter.HTML(;
prettyurls = true,
canonical = "https://{{ PackageOwner }}.github.io/{{ PackageName }}.jl",
assets = ["assets/style.css"],
),
format = Documenter.HTML(; canonical = "https://{{ PackageOwner }}.github.io/{{ PackageName }}.jl"),
pages = [
"Home" => "index.md"
"index.md"
[
nice_name(file) => file for
file for
file in readdir(joinpath(@__DIR__, "src")) if file != "index.md" && splitext(file)[2] == ".md"
]
],
)

deploydocs(; repo = "github.com/{{ PackageOwner }}/{{ PackageName }}.jl", push_preview = true)
deploydocs(; repo = "github.com/{{ PackageOwner }}/{{ PackageName }}.jl")

0 comments on commit e5265e7

Please sign in to comment.