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

update to Documenter 0.25 #200

Merged
merged 8 commits into from
Aug 7, 2020
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
Manifest.toml
docs/build
docs/site
docs/src/assets/chainrules.css
37 changes: 29 additions & 8 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BinaryProvider]]
deps = ["Libdl", "Logging", "SHA"]
git-tree-sha1 = "ecdec412a9abc8db54c0efc5548c64dfce072058"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.10"

[[ChainRulesCore]]
deps = ["MuladdMacro"]
path = ".."
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "0.9.3"
version = "0.9.5"

[[Dates]]
deps = ["Printf"]
Expand All @@ -19,15 +25,24 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "88bb0edb352b16608036faadcc071adda068582a"
git-tree-sha1 = "c5714d9bcdba66389612dc4c47ed827c64112997"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.1"
version = "0.8.2"

[[Documenter]]
deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "d45c163c7a3ae293c15361acc52882c0f853f97c"
deps = ["Base64", "Dates", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "1c593d1efa27437ed9dd365d1143c594b563e138"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.23.4"
version = "0.25.1"

[[DocumenterTools]]
deps = ["Base64", "DocStringExtensions", "Documenter", "FileWatching", "LibGit2", "Sass"]
git-tree-sha1 = "6fa30234228d9020cbe31e393e9d183e944845bb"
uuid = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
version = "0.1.7"

[[FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"

[[InteractiveUtils]]
deps = ["Markdown"]
Expand Down Expand Up @@ -63,9 +78,9 @@ version = "0.2.2"

[[Parsers]]
deps = ["Dates", "Test"]
git-tree-sha1 = "0c16b3179190d3046c073440d94172cfc3bb0553"
git-tree-sha1 = "10134f2ee0b1978ae7752c41306e131a684e1f06"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "0.3.12"
version = "1.0.7"

[[Pkg]]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
Expand All @@ -86,6 +101,12 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Sass]]
deps = ["BinaryProvider", "Libdl", "Test"]
git-tree-sha1 = "de11179555c6363c5a61c4c94376db3498983734"
uuid = "322a6be2-4ae8-5d68-aaf1-3e960788d1d9"
version = "0.1.0"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

Expand Down
4 changes: 3 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"

[compat]
Documenter = "~0.23"
Documenter = "0.25"
DocumenterTools = "0.1.6"
36 changes: 12 additions & 24 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using ChainRulesCore
using Documenter

@show ENV
using DocumenterTools: Themes

DocMeta.setdocmeta!(
ChainRulesCore,
Expand All @@ -19,9 +18,15 @@ DocMeta.setdocmeta!(
end
)

Themes.compile(joinpath(@__DIR__, "src/assets/chainrules.scss"))

makedocs(
modules=[ChainRulesCore],
format=Documenter.HTML(prettyurls=false, assets=["assets/chainrules.css"]),
format=Documenter.HTML(
prettyurls=false,
assets=["assets/chainrules.css"],
mathengine=MathJax(),
),
sitename="ChainRules",
authors="Jarrett Revels and other contributors",
pages=[
Expand All @@ -40,24 +45,7 @@ makedocs(
checkdocs=:exports,
)

const repo = "github.com/JuliaDiff/ChainRulesCore.jl.git"
const PR = get(ENV, "TRAVIS_PULL_REQUEST", "false")
if PR == "false"
# Normal case, only deploy docs if merging to master or release tagged
deploydocs(repo=repo)
else
@info "Deploying review docs for PR #$PR"
# TODO: remove most of this once https://github.com/JuliaDocs/Documenter.jl/issues/1131 is resolved

# Overwrite Documenter's function for generating the versions.js file
foreach(Base.delete_method, methods(Documenter.Writers.HTMLWriter.generate_version_file))
Documenter.Writers.HTMLWriter.generate_version_file(_, _) = nothing
# Overwrite necessary environment variables to trick Documenter to deploy
ENV["TRAVIS_PULL_REQUEST"] = "false"
ENV["TRAVIS_BRANCH"] = "master"

deploydocs(
devurl="preview-PR$(PR)",
repo=repo,
)
end
deploydocs(
repo = "github.com/JuliaDiff/ChainRulesCore.jl.git",
push_preview=true,
)
78 changes: 0 additions & 78 deletions docs/src/assets/chainrules.css

This file was deleted.

109 changes: 109 additions & 0 deletions docs/src/assets/chainrules.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
// Only for light theme

html:not(.theme--documenter-dark) body #documenter {

// Links

a {
color: #4595D1;
}

a:hover, a:focus {
color: #194E82;
}

// Navigation

.docs-sidebar {
box-shadow: none;
color: #FFFFFF;
background-color: #194E82;

ul.docs-menu {
border-top: none;

%nav-hover {
color: #FFFFFF;
background-color: #4595D1;
}

.tocitem {
color: #FFFFFF;
background: none;

&:hover { @extend %nav-hover; }
}

li.is-active {
border-top: none;
border-bottom: none;

.tocitem {
@extend %nav-hover;

&:hover { @extend %nav-hover; }
}

ul.internal {
margin: 0;
border-top: none;

li {
margin-top: 0;
}

.tocitem {
color: #194E82;
background-color: #FFFFFF;
padding: 0.5em;
padding-left: 1em;

&:hover { @extend %nav-hover; }
}
}
}
}
}

// Text

article#documenter-page a.docs-heading-anchor {
color: #194E82;
}

// Code

code {
color: inherit;

.hljs-meta { color: #4595D1; }

.hljs-keyword { color: #194E82; }
}

pre, code {
font-family: "Liberation Mono", "Consolas", "DejaVu Sans Mono", "Ubuntu Mono", "andale mono", "lucida console", monospace;
}
}

// Terminology Block

.admonition.is-category-terminology {
background-color: #FFFEDD;
border-color: #FFEC8B;

> .admonition-header {
background-color: #FFEC8B;
color: black;

&:before {
content: "Terminology: ";
font-family: inherit;
font-weight: bold;
}
}
}

html.theme--documenter-dark .admonition.is-category-terminology {
border-color: #FFEC8B;
}