-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
108 additions
and
1 deletion.
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
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,7 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[compat] | ||
Documenter = "0.27.8" |
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,50 @@ | ||
pushfirst!(LOAD_PATH, joinpath(@__DIR__, "..")) # add Enzyme to environment stack | ||
|
||
using Reactant | ||
using Documenter | ||
|
||
DocMeta.setdocmeta!(Reactant, :DocTestSetup, :(using Reactant); recursive=true) | ||
|
||
# Generate examples | ||
|
||
using Literate | ||
|
||
const EXAMPLES_DIR = joinpath(@__DIR__, "..", "examples") | ||
const OUTPUT_DIR = joinpath(@__DIR__, "src/generated") | ||
|
||
examples = Pair{String,String}[] | ||
|
||
for (_, name) in examples | ||
example_filepath = joinpath(EXAMPLES_DIR, string(name, ".jl")) | ||
Literate.markdown(example_filepath, OUTPUT_DIR, documenter = true) | ||
end | ||
|
||
examples = [title => joinpath("generated", string(name, ".md")) for (title, name) in examples] | ||
|
||
makedocs(; | ||
modules=[Reactant], | ||
authors="William Moses <[email protected]>, Valentin Churavy <[email protected]>", | ||
repo="https://github.com/EnzymeAD/Reactant.jl/blob/{commit}{path}#{line}", | ||
sitename="Reactant.jl", | ||
format=Documenter.HTML(; | ||
prettyurls=get(ENV, "CI", "false") == "true", | ||
canonical="https://enzymead.github.io/Reactant.jl/", | ||
assets = [ | ||
asset("https://plausible.io/js/plausible.js", | ||
class=:js, | ||
attributes=Dict(Symbol("data-domain") => "enzyme.mit.edu", :defer => "") | ||
) | ||
], | ||
), | ||
pages = [ | ||
"Home" => "index.md", | ||
], | ||
doctest = true, | ||
strict = true, | ||
) | ||
|
||
deploydocs(; | ||
repo="github.com/EnzymeAD/Reactant.jl", | ||
devbranch = "main", | ||
push_preview = true, | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,13 @@ | ||
```@meta | ||
CurrentModule = Reactant | ||
DocTestSetup = quote | ||
using Reactant | ||
end | ||
``` | ||
|
||
# Reactant | ||
|
||
Documentation for [Reactant.jl](https://github.com/EnzymeAD/Reactant.jl). | ||
|
||
This is truly something which we should write docs for. | ||
|