Skip to content

Commit

Permalink
Update to Documenter 0.21 and prepare for PDF documentation builds. (#…
Browse files Browse the repository at this point in the history
…30339)

(cherry picked from commit 217d330)
  • Loading branch information
fredrikekre authored and KristofferC committed Dec 30, 2018
1 parent 2cadff3 commit e7187f6
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 18 deletions.
3 changes: 2 additions & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ help:
@echo "To fix outdated doctests, use 'make <target> doctest=fix'"


DOCUMENTER_OPTIONS := linkcheck=$(linkcheck) doctest=$(doctest) buildroot=$(call cygpath_w,$(BUILDROOT))
DOCUMENTER_OPTIONS := linkcheck=$(linkcheck) doctest=$(doctest) buildroot=$(call cygpath_w,$(BUILDROOT)) \
texplatform=$(texplatform)

UnicodeData.txt:
$(JLDOWNLOAD) http://www.unicode.org/Public/9.0.0/ucd/UnicodeData.txt
Expand Down
27 changes: 14 additions & 13 deletions doc/Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is machine-generated - editing it directly is not advised

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

Expand All @@ -6,35 +8,34 @@ deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[Distributed]]
deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "a016e0bfe98a748c4488e2248c2ef4c67d6fdd35"
git-tree-sha1 = "1df01539a1c952cef21f2d2d1c092c2bcf0177d7"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.5.0"
version = "0.6.0"

[[Documenter]]
deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "LibGit2", "Logging", "Markdown", "Pkg", "REPL", "Random", "Test", "Unicode"]
git-tree-sha1 = "9f2135e0e7ecb63f9c3ef73ea15a31d8cdb79bb7"
git-tree-sha1 = "a6db1c69925cdc53aafb38caec4446be26e0c617"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.20.0"
version = "0.21.0"

[[DocumenterLaTeX]]
deps = ["Documenter", "Test"]
git-tree-sha1 = "653299370be20ff580bccd707dc9f360c0852d7f"
uuid = "cd674d7a-5f81-5cf3-af33-235ef1834b99"
version = "0.2.0"

[[InteractiveUtils]]
deps = ["LinearAlgebra", "Markdown"]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

Expand Down
1 change: 1 addition & 0 deletions doc/Project.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterLaTeX = "cd674d7a-5f81-5cf3-af33-235ef1834b99"
17 changes: 13 additions & 4 deletions doc/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pushfirst!(DEPOT_PATH, joinpath(@__DIR__, "deps"))
using Pkg
Pkg.instantiate()

using Documenter
using Documenter, DocumenterLaTeX

# Include the `build_sysimg` file.

Expand Down Expand Up @@ -153,6 +153,17 @@ let r = r"buildroot=(.+)", i = findfirst(x -> occursin(r, x), ARGS)
global const buildroot = i === nothing ? (@__DIR__) : first(match(r, ARGS[i]).captures)
end

const format = if render_pdf
LaTeX(
platform = "texplatform=docker" in ARGS ? "docker" : "native"
)
else
Documenter.HTML(
prettyurls = ("deploy" in ARGS),
canonical = ("deploy" in ARGS) ? "https://docs.julialang.org/en/v1/" : nothing,
)
end

makedocs(
build = joinpath(buildroot, "doc", "_build", (render_pdf ? "pdf" : "html"), "en"),
modules = [Base, Core, BuildSysImg, [Base.root_module(Base, stdlib.stdlib) for stdlib in STDLIB_DOCS]...],
Expand All @@ -162,13 +173,11 @@ makedocs(
linkcheck_ignore = ["https://bugs.kde.org/show_bug.cgi?id=136779"], # fails to load from nanosoldier?
strict = true,
checkdocs = :none,
format = render_pdf ? :latex : :html,
format = format,
sitename = "The Julia Language",
authors = "The Julia Project",
analytics = "UA-28835595-6",
pages = PAGES,
html_prettyurls = ("deploy" in ARGS),
html_canonical = ("deploy" in ARGS) ? "https://docs.julialang.org/en/v1/" : nothing,
assets = ["assets/julia-manual.css", ]
)

Expand Down

0 comments on commit e7187f6

Please sign in to comment.