2021-09-23 10:48:37 -04:00
|
|
|
using Cowsay
|
2021-09-15 18:51:11 -04:00
|
|
|
using Documenter
|
|
|
|
|
2021-09-23 10:36:39 -04:00
|
|
|
DocMeta.setdocmeta!(Cowsay, :DocTestSetup, :(using Cowsay); recursive=true)
|
2021-09-15 18:51:11 -04:00
|
|
|
|
2024-12-17 00:28:10 -05:00
|
|
|
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
|
|
|
|
|
2021-09-15 18:51:11 -04:00
|
|
|
makedocs(;
|
2021-09-23 10:11:47 -04:00
|
|
|
modules=[Cowsay],
|
2021-09-15 18:51:11 -04:00
|
|
|
authors="Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> and contributors",
|
2024-12-17 00:28:10 -05:00
|
|
|
repo=GiteaRemote("code.millironx.com", "millironx", "Cowsay.jl"),
|
2023-02-22 13:00:31 -05:00
|
|
|
sitename="Cowsay.jl",
|
2021-09-15 18:51:11 -04:00
|
|
|
format=Documenter.HTML(;
|
|
|
|
prettyurls=get(ENV, "CI", "false") == "true",
|
2023-02-22 13:00:31 -05:00
|
|
|
canonical="https://cowsay-jl.millironx.com/",
|
2021-09-15 18:51:11 -04:00
|
|
|
assets=String[],
|
|
|
|
),
|
|
|
|
pages=[
|
|
|
|
"Home" => "index.md",
|
2022-01-11 20:20:50 -05:00
|
|
|
"Available Cowfiles" => "cows.md",
|
|
|
|
"Make your own Cowfile" => "cowfiles.md",
|
2024-12-17 00:28:10 -05:00
|
|
|
"Private API Reference" => "private.md",
|
2021-09-15 18:51:11 -04:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
deploydocs(;
|
2023-02-22 13:00:31 -05:00
|
|
|
repo="code.millironx.com/millironx/Cowsay.jl",
|
2021-09-15 18:51:11 -04:00
|
|
|
devbranch="master",
|
|
|
|
)
|