-
Notifications
You must be signed in to change notification settings - Fork 1
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
Janis Erdmanis
committed
Mar 4, 2024
1 parent
61c1af7
commit f8e2f70
Showing
7 changed files
with
1,625 additions
and
10 deletions.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ dirname(@__DIR__) in LOAD_PATH || Base.push!(LOAD_PATH, dirname(@__DIR__)) | |
|
||
using Documenter | ||
using PeaceFounder | ||
using JSON3 | ||
|
||
function copy_if_changed(source, destination) | ||
|
||
|
@@ -17,13 +18,25 @@ function copy_if_changed(source, destination) | |
end | ||
end | ||
|
||
|
||
|
||
#cp((@__DIR__) * "/../README.md", (@__DIR__) * "/src/index.md", force = true) | ||
copy_if_changed((@__DIR__) * "/../README.md", (@__DIR__) * "/src/index.md") | ||
|
||
Documenter.HTML(assets = [ | ||
asset("assets/swagger/[email protected]/swagger-ui-bundle.js", class=:js, islocal=true), | ||
#asset(joinpath(@__DIR__, "src/assets/swagger/[email protected]/swagger-ui-bundle.js"), class=:js, islocal=true), | ||
]) | ||
|
||
|
||
makedocs( | ||
sitename = "PeaceFounder.jl", | ||
repo = Documenter.Remotes.GitHub("PeaceFounder", "PeaceFounder.jl"), | ||
format = Documenter.HTML(), | ||
format = Documenter.HTML( | ||
assets = [asset("https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.11.8/swagger-ui-bundle.js", class=:js), | ||
asset("https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.11.8/swagger-ui.css", class=:css)] | ||
|
||
), | ||
modules = [PeaceFounder.Model, PeaceFounder.Client], | ||
pages = [ | ||
"index.md", | ||
|
@@ -32,14 +45,31 @@ makedocs( | |
"Client" => "client.md", | ||
"Audit" => "audit.md", | ||
"API" => [ | ||
"REST" => "schema.md", | ||
"HTTP" => "schema.md", | ||
"PeaceFounder.Model" => "model_api.md", | ||
"PeaceFounder.AuditTools" => "audittools.md", | ||
"PeaceFounder.Schedulers" => "schedulers.md" | ||
] | ||
], | ||
) | ||
|
||
|
||
# Adding a schema to assets directory after the build | ||
|
||
SCHEMA_PATH = joinpath(@__DIR__, "build/assets/schema.json") | ||
rm(SCHEMA_PATH, force=true) | ||
|
||
open(SCHEMA_PATH, "w") do file | ||
schema = PeaceFounder.Service.OxygenInstance.getschema() | ||
JSON3.write(file, schema) | ||
end | ||
|
||
open(joinpath(@__DIR__, "build/assets/themes/documenter-dark.css"), "a") do file | ||
contents = read(joinpath(@__DIR__, "assets/swagger-dark.css")) | ||
write(file, contents) | ||
end | ||
|
||
|
||
# Documenter can also automatically deploy documentation to gh-pages. | ||
# See "Hosting Documentation" and deploydocs() in the Documenter manual | ||
# for more information. | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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