Cowsay.jl/docs/make.jl
Thomas A. Christensen II bb25e984e2
All checks were successful
ci/woodpecker/push/ci/1 Pipeline was successful
ci/woodpecker/push/ci/2 Pipeline was successful
ci/woodpecker/push/ci/3 Pipeline was successful
ci/woodpecker/push/ci/4 Pipeline was successful
ci/woodpecker/push/ci/5 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci: Make Woodpecker more modern
2024-12-16 23:28:10 -06:00

49 lines
1.5 KiB
Julia

using Cowsay
using Documenter
DocMeta.setdocmeta!(Cowsay, :DocTestSetup, :(using Cowsay); recursive=true)
struct GiteaRemote <: Documenter.Remote
host::String
user::String
repo::String
end
function Documenter.Remotes.repourl(remote::GiteaRemote)
return "https://$(remote.host)/$(remote.user)/$(remote.repo)"
end
function Documenter.Remotes.fileurl(remote::GiteaRemote, ref, filename, linerange)
if isnothing(linerange)
return "https://$(remote.host)/$(remote.user)/$(remote.repo)/src/commit/$ref/$filename"
else
return "https://$(remote.host)/$(remote.user)/$(remote.repo)/src/commit/$ref/$filename#L$(first(linerange))-$(last(linerange))"
end
end
function Documenter.Remotes.issueurl(remote::GiteaRemote, issuenumber)
return "https://$(remote.host)/$(remote.user)/$(remote.repo)/issues/$issuenumber"
end
makedocs(;
modules=[Cowsay],
authors="Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> and contributors",
repo=GiteaRemote("code.millironx.com", "millironx", "Cowsay.jl"),
sitename="Cowsay.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://cowsay-jl.millironx.com/",
assets=String[],
),
pages=[
"Home" => "index.md",
"Available Cowfiles" => "cows.md",
"Make your own Cowfile" => "cowfiles.md",
"Private API Reference" => "private.md",
],
)
deploydocs(;
repo="code.millironx.com/millironx/Cowsay.jl",
devbranch="master",
)