Skip to content

Commit 5e1bc1c

Browse files
committed
add multiple docs
1 parent 4e441a4 commit 5e1bc1c

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
44
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
55
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
66
GeometricFlux = "7e08b658-56d3-11e9-2997-919d5b31e4ea"
7+
MultiDocumenter = "87ed4bf0-c935-4a67-83c3-2a03bee4197c"
78

89
[compat]
910
Documenter = "0.27"

docs/make.jl

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
using Documenter
22
using DocumenterCitations
3+
using MultiDocumenter
34
using DemoCards
45
using GeometricFlux
56

67
const ASSETS = ["assets/flux.css", "assets/favicon.ico"]
78

89
bib = CitationBibliography(joinpath(@__DIR__, "bibliography.bib"), sorting=:nyt)
910

10-
DocMeta.setdocmeta!(GeometricFlux, :DocTestSetup, :(using GeometricFlux, Flux); recursive=true)
11+
DocMeta.setdocmeta!(GeometricFlux, :DocTestSetup, :(using GeometricFlux, GraphSignals, Flux); recursive=true)
1112

1213
# DemoCards
1314
demopage, postprocess_cb, demo_assets = makedemos("tutorials")
1415
isnothing(demo_assets) || (push!(ASSETS, demo_assets))
1516

17+
# build GeometricFlux documentation
1618
makedocs(
1719
bib,
1820
sitename = "GeometricFlux.jl",
@@ -23,7 +25,7 @@ makedocs(
2325
edit_link = "master",
2426
),
2527
clean = false,
26-
modules = [GeometricFlux,GraphSignals],
28+
modules = [GeometricFlux, GraphSignals],
2729
pages = ["Home" => "index.md",
2830
demopage,
2931
"Introduction" => "introduction.md",
@@ -59,7 +61,39 @@ makedocs(
5961
# callbacks of DemoCards
6062
postprocess_cb()
6163

64+
# build MultiDocumenter
65+
clonedir = mktempdir()
66+
67+
docs = [
68+
("FluxML/GeometricFlux.jl.git", "gh-pages", false) => MultiDocumenter.MultiDocRef(
69+
upstream = joinpath(clonedir, "GeometricFlux"),
70+
path = "geometricflux",
71+
name = "GeometricFlux"
72+
),
73+
("yuehhua/GraphSignals.jl.git", "gh-pages", false) => MultiDocumenter.MultiDocRef(
74+
upstream = joinpath(clonedir, "GraphSignals"),
75+
path = "graphsignals",
76+
name = "GraphSignals"
77+
),
78+
]
79+
80+
for ((remote, branch, use_ssh), docref) in docs
81+
prefix = use_ssh ? "git@github.com:" : "https://github.com/"
82+
run(`git clone --depth 1 $prefix$remote --branch $branch --single-branch $(docref.upstream)`)
83+
end
84+
85+
outpath = joinpath(@__DIR__, "out")
86+
87+
MultiDocumenter.make(
88+
outpath,
89+
collect(last.(docs));
90+
search_engine = MultiDocumenter.SearchConfig(
91+
index_versions = ["stable"],
92+
engine = MultiDocumenter.FlexSearch
93+
)
94+
)
95+
6296
deploydocs(
6397
repo = "github.com/FluxML/GeometricFlux.jl.git",
64-
target = "build",
98+
target = "out",
6599
)

0 commit comments

Comments
 (0)