Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to new Documenter #29470

Merged
merged 1 commit into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 9 additions & 32 deletions doc/Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "277d3807440d9793421354b6680911fc95d91a84"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "1.0.1"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

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

[[DocStringExtensions]]
deps = ["Compat"]
git-tree-sha1 = "0d767d338c201b1b2064e2186a0b63ac1e55dbb1"
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "a016e0bfe98a748c4488e2248c2ef4c67d6fdd35"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.4.5"
version = "0.5.0"

[[Documenter]]
deps = ["Compat", "DocStringExtensions", "Logging", "REPL"]
git-tree-sha1 = "ef29b036c7eb40bca1ac5471639ec01e98717d27"
deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "LibGit2", "Logging", "Markdown", "Pkg", "REPL", "Random", "Test", "Unicode"]
git-tree-sha1 = "90850787fae5bddd99fd9927edd6b52e1a87e62f"
repo-rev = "master"
repo-url = "https://github.com/JuliaDocs/Documenter.jl.git"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.19.3"
version = "0.19.6+"

[[InteractiveUtils]]
deps = ["LinearAlgebra", "Markdown"]
Expand All @@ -52,9 +44,6 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Expand All @@ -77,27 +66,15 @@ uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[UUIDs]]
deps = ["Random"]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
Expand Down
39 changes: 2 additions & 37 deletions doc/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,49 +166,14 @@ makedocs(
assets = ["assets/julia-manual.css", ]
)

# This overloads the function in Documenter that generates versions.js, to include
# v1/ in the version selector, instead of stable/.
#
# The function is identical to the version found in Documenter v0.19.6, except that
# it includes "v1" instead of "stable".
#
# Original:
# https://github.com/JuliaDocs/Documenter.jl/blob/v0.19.6/src/Writers/HTMLWriter.jl#L481-L506
#
import Documenter.Writers.HTMLWriter: generate_version_file
function generate_version_file(dir::AbstractString)
named_folders = ["v1", "latest"]
tag_folders = []
for each in readdir(dir)
each == "v1" && continue # skip the v1 symlink
occursin(Base.VERSION_REGEX, each) && push!(tag_folders, each)
end
# sort tags by version number
sort!(tag_folders, lt = (x, y) -> VersionNumber(x) < VersionNumber(y), rev = true)
open(joinpath(dir, "versions.js"), "w") do buf
println(buf, "var DOC_VERSIONS = [")
for group in (named_folders, tag_folders)
for folder in group
println(buf, " \"", folder, "\",")
end
end
println(buf, "];")
end
end

# Only deploy docs from 64bit Linux to avoid committing multiple versions of the same
# docs from different workers.
if "deploy" in ARGS && Sys.ARCH === :x86_64 && Sys.KERNEL === :Linux
# Since the `.travis.yml` config specifies `language: cpp` and not `language: julia` we
# need to manually set the version of Julia that we are deploying the docs from.
ENV["TRAVIS_JULIA_VERSION"] = "nightly"

deploydocs(
julia = "nightly",
repo = "github.com/JuliaLang/julia.git",
target = "_build/html/en",
dirname = "en",
deps = nothing,
make = nothing,
devurl = "v1.1-dev",
versions = ["v#.#", "v1.1-dev" => "v1.1-dev"]
)
end