Skip to content

Commit

Permalink
Use a variable to improve readibility of docs/make.jl
Browse files Browse the repository at this point in the history
Closes #351
  • Loading branch information
abelsiqueira committed Sep 5, 2024
1 parent 5477d86 commit cd4d423
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
12 changes: 5 additions & 7 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@ using Documenter
DocMeta.setdocmeta!(BestieTemplate, :DocTestSetup, :(using BestieTemplate); recursive = true)

const page_rename = Dict("developer.md" => "Developer docs") # Without the numbers
const numbered_pages = [
file for
file in readdir(joinpath(@__DIR__, "src")) if file != "index.md" && splitext(file)[2] == ".md"
]

makedocs(;
modules = [BestieTemplate],
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(; canonical = "https://abelsiqueira.github.io/BestieTemplate.jl"),
pages = [
"index.md"
[
file for
file in readdir(joinpath(@__DIR__, "src")) if file != "index.md" && splitext(file)[2] == ".md"
]
],
pages = ["index.md"; numbered_pages],
)

deploydocs(; repo = "github.com/abelsiqueira/BestieTemplate.jl")
12 changes: 5 additions & 7 deletions template/docs/make.jl.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@ using Documenter
DocMeta.setdocmeta!({{ PackageName }}, :DocTestSetup, :(using {{ PackageName }}); recursive = true)

const page_rename = Dict("developer.md" => "Developer docs") # Without the numbers
const numbered_pages = [
file for
file in readdir(joinpath(@__DIR__, "src")) if file != "index.md" && splitext(file)[2] == ".md"
]

makedocs(;
modules = [{{ PackageName }}],
authors = "{{ AuthorName }} <{{ AuthorEmail }}> and contributors",
repo = "https://github.com/{{ PackageOwner }}/{{ PackageName }}.jl/blob/{commit}{path}#{line}",
sitename = "{{ PackageName }}.jl",
format = Documenter.HTML(; canonical = "https://{{ PackageOwner }}.github.io/{{ PackageName }}.jl"),
pages = [
"index.md"
[
file for file in readdir(joinpath(@__DIR__, "src")) if
file != "index.md" && splitext(file)[2] == ".md"
]
],
pages = ["index.md"; numbered_pages],
)

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

0 comments on commit cd4d423

Please sign in to comment.