forked from thofma/Hecke.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rehaul documentation build and add instructions (thofma#381)
- Loading branch information
Showing
7 changed files
with
274 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# | ||
# This file is included by docs/make.jl and by a helper function | ||
# in src/Hecke.jl | ||
# | ||
module Build | ||
|
||
using Documenter, DocumenterMarkdown, DocumenterCitations | ||
|
||
pages = [ | ||
"index.md", | ||
"Number fields" => [ "number_fields/intro.md", | ||
"number_fields/fields.md", | ||
"number_fields/elements.md", | ||
"number_fields/internal.md"], | ||
"Function fields" => [ "function_fields/intro.md", | ||
"function_fields/basics.md", | ||
"function_fields/elements.md", | ||
"function_fields/internal.md", | ||
"function_fields/degree_localization.md"], | ||
"Orders" => [ "orders/introduction.md", | ||
"orders/orders.md", | ||
"orders/elements.md", | ||
"orders/ideals.md", | ||
"orders/frac_ideals.md" | ||
], | ||
"abelian/introduction.md", | ||
"class_fields/intro.md", | ||
"sparse/intro.md", | ||
"FacElem.md", | ||
"examples.md", | ||
"Developer" => [ "dev/test.md", | ||
"dev/documentation.md", | ||
] | ||
] | ||
|
||
# Overwrite printing to make the header not full of redundant nonsense | ||
# Turns | ||
# Hecke.Order - Method | ||
# into | ||
# Order - Method | ||
|
||
# To remove the '-' | ||
# Documenter.Utilities.print_signature(io::IO, signature) = print(io, signature) | ||
|
||
# To remove the "Method", "Type", "Module" use the following | ||
# Documenter.Utilities.doccat(b::Base.Docs.Binding, ::Type) = "" | ||
# doccat(::Type) = "" | ||
# doccat(::Module) = "" | ||
|
||
# Remove the module prefix | ||
Base.print(io::IO, b::Base.Docs.Binding) = print(io, b.var) | ||
|
||
function make(Hecke::Module; strict::Bool = false, | ||
local_build::Bool = false, | ||
doctest::Bool = true, | ||
format::Symbol = :mkdocs) | ||
|
||
# Load the bibliography | ||
bib = CitationBibliography(joinpath(Hecke.pkgdir, "docs", "src", "Hecke.bib"), sorting = :nyt) | ||
|
||
cd(joinpath(Hecke.pkgdir, "docs")) do | ||
DocMeta.setdocmeta!(Hecke, :DocTestSetup, :(using Hecke); recursive = true) | ||
|
||
if format == :html | ||
makedocs( | ||
bib, | ||
format = Documenter.HTML(prettyurls = !local_build, collapselevel = 1), | ||
doctest = doctest, | ||
strict = strict, | ||
modules = [Hecke], | ||
sitename = "Hecke documentation", | ||
pages = pages | ||
) | ||
elseif format == :mkdocs | ||
makedocs( | ||
bib, | ||
doctest= doctest, | ||
strict = strict, | ||
modules = [Hecke], | ||
format = Markdown(), | ||
) | ||
end | ||
end | ||
end | ||
|
||
end # module Build | ||
|
||
using .Build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.