Skip to content

Commit 6abbabe

Browse files
committed
renaming
1 parent 4463d53 commit 6abbabe

File tree

390 files changed

+3679
-38742
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

390 files changed

+3679
-38742
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@
2020
# MAC
2121
.DS_Store
2222
.AppleDouble
23-
.LSOverride
23+
.LSOverride
24+
docs/node_modules/
25+

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
33
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
44
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
55
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
6+
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
67
GraphRecipes = "bd48cda9-67a9-57be-86fa-5b3c104eda73"
78
IRTools = "7869d1d1-7146-5819-86e3-90919afe41df"
89
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
10+
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
911
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
1012
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
13+
Scientific_Programming_in_Julia = "ff288558-a322-4c39-84bc-85bf6acf7e03"
1114
SoftPosit = "0775deef-a35f-56d7-82da-cfc52f91364d"
1215
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1316
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

docs/liveserver.jl

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/make.jl

Lines changed: 125 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,135 @@
1-
using Documenter
2-
3-
using Downloads: download
4-
using Documenter.Writers: HTMLWriter
5-
using DocumenterTools.Themes
6-
7-
8-
# download and compile theme
9-
assetsdir(args...) = joinpath(@__DIR__, "src", "assets", args...)
10-
site = "https://github.com/JuliaTeachingCTU/JuliaCTUGraphics/raw/main/"
11-
force = true
12-
13-
mkpath(assetsdir("themes"))
14-
mv(download("$(site)logo/CTU-logo-dark.svg"), assetsdir("logo-dark.svg"); force)
15-
mv(download("$(site)logo/CTU-logo.svg"), assetsdir("logo.svg"); force)
16-
mv(download("$(site)icons/favicon.ico"), assetsdir("favicon.ico"); force)
17-
18-
# for theme in ["light", "dark"]
19-
# mktemp(@__DIR__) do path, io
20-
# write(io, join([
21-
# read(joinpath(HTMLWriter.ASSETS_THEMES, "documenter-$(theme).css"), String),
22-
# read(download("$(site)assets/lectures-$(theme).css"), String)
23-
# ], "\n"))
24-
# Themes.compile(
25-
# path,
26-
# joinpath(@__DIR__, assetsdir("themes", "documenter-$(theme).css"))
27-
# )
28-
# end
29-
# end
30-
31-
32-
# documentation
1+
using Documenter, DocumenterVitepress
2+
using Documenter.Remotes
3+
4+
using Scientific_Programming_in_Julia
5+
6+
# This is needed for live preview
7+
if get(ENV, "VITREPRESS_LIVE_PREVIEW", "false") == "true"
8+
VITREPRESS_KWARGS = (;
9+
md_output_path=".",
10+
build_vitepress=false,
11+
)
12+
MAKEDOCS_KWARGS = (; clean=false,)
13+
else
14+
VITREPRESS_KWARGS = (;)
15+
MAKEDOCS_KWARGS = (;)
16+
end
17+
18+
@show VITREPRESS_KWARGS
19+
@show MAKEDOCS_KWARGS
20+
21+
# utilities
22+
function add_prefix(prefix::S, pair::Pair{S,T}) where {S<:AbstractString,T}
23+
key, val = pair
24+
if isa(val, AbstractString)
25+
return key => joinpath(prefix, val)
26+
else
27+
return key => add_prefix(prefix, val)
28+
end
29+
end
30+
31+
function add_prefix(prefix::AbstractString, pairs::AbstractVector{<:Pair})
32+
return add_prefix.(prefix, pairs)
33+
end
34+
35+
# pages
3336
pages = [
3437
"Home" => "index.md",
35-
"Installation" => "installation.md",
36-
"Projects" => "projects.md",
37-
"1: Introduction" => [
38-
"Motivation" => "./lecture_01/motivation.md",
39-
"Basics" => "./lecture_01/basics.md",
40-
"Examples" => "./lecture_01/demo.md",
41-
"Outline" => "./lecture_01/outline.md",
42-
"Lab" => "./lecture_01/lab.md",
43-
"Homework" => "./lecture_01/hw.md",
44-
],
45-
46-
"2: The power of type system & multiple dispatch" => [
47-
"Lecture" => "./lecture_02/lecture.md",
48-
"Lab" => "./lecture_02/lab.md",
49-
"Homework" => "./lecture_02/hw.md",
50-
],
51-
52-
"3: Design patterns" => [
53-
"Lecture" => "./lecture_03/lecture.md",
54-
"Lab" => "./lecture_03/lab.md",
55-
"Homework" => "./lecture_03/hw.md",
56-
],
57-
58-
"4: Package development, unit tests & CI" => [
59-
"Lecture" => "./lecture_04/lecture.md",
60-
"Lab" => "./lecture_04/lab.md",
61-
"Homework" => "./lecture_04/hw.md",
62-
],
63-
64-
"5: Performance benchmarking" => [
65-
"Lecture" => "./lecture_05/lecture.md",
66-
"Lab" => "./lecture_05/lab.md",
67-
"Homework" => "./lecture_05/hw.md",
68-
],
69-
70-
"6: Lanuage introspection" => [
71-
"Lecture" => "./lecture_06/lecture.md",
72-
"Lab" => "./lecture_06/lab.md",
73-
"Homework" => "./lecture_06/hw.md",
74-
],
75-
76-
"7: Macros" => [
77-
"Lecture" => "./lecture_07/lecture.md",
78-
"Lab" => "./lecture_07/lab.md",
79-
"Homework" => "./lecture_07/hw.md",
80-
],
81-
82-
"8: Automatic differentiation" => [
83-
"Lecture" => "./lecture_08/lecture.md",
84-
"Lab" => "./lecture_08/lab.md",
85-
"Homework" => "./lecture_08/hw.md",
86-
],
87-
88-
"9: Intermediate representation" => [
89-
"Lecture" => "./lecture_09/lecture.md",
90-
"Lab" => "./lecture_09/lab.md",
91-
],
92-
93-
"10: Parallel programming" => [
94-
"Lecture" => "./lecture_10/lecture.md",
95-
"Lab" => "./lecture_10/lab.md",
96-
"Homework" => "./lecture_10/hw.md",
97-
],
98-
99-
"11: GPU programming" => [
100-
"Lecture" => "./lecture_11/lecture.md",
101-
"Lab" => "./lecture_11/lab.md",
102-
],
103-
104-
"12: Ordinary Differential Equations" => [
105-
"Lecture" => "./lecture_12/lecture.md",
106-
"Lab" => "./lecture_12/lab.md",
107-
"Homework" => "./lecture_12/hw.md",
108-
],
38+
"Tutorials" => add_prefix("./tutorials", [
39+
"Installation" => "installation.md",
40+
]),
41+
"Projects" => add_prefix("./projects", [
42+
"Requirements" => "requirements.md",
43+
"Potential projects" => "projects.md",
44+
]),
45+
"Lectures" => add_prefix("./lectures", [
46+
"Outline" => "outline.md",
47+
"1: Introduction" => add_prefix("lecture_01", [
48+
"Motivation" => "motivation.md",
49+
"Basics" => "basics.md",
50+
"Examples" => "demo.md",
51+
"Lab" => "lab.md",
52+
"Homework" => "hw.md",
53+
]),
54+
"2: The power of type system & multiple dispatch" => add_prefix("lecture_02", [
55+
"Lecture" => "lecture.md",
56+
"Lab" => "lab.md",
57+
"Homework" => "hw.md",
58+
]),
59+
"3: Design patterns" => add_prefix("lecture_03", [
60+
"Lecture" => "lecture.md",
61+
"Lab" => "lab.md",
62+
"Homework" => "hw.md",
63+
]),
64+
"4: Package development, unit tests & CI" => add_prefix("lecture_04", [
65+
"Lecture" => "lecture.md",
66+
"Lab" => "lab.md",
67+
"Homework" => "hw.md",
68+
]),
69+
"5: Performance benchmarking" => add_prefix("lecture_05", [
70+
"Lecture" => "lecture.md",
71+
"Lab" => "lab.md",
72+
"Homework" => "hw.md",
73+
]),
74+
"6: Lanuage introspection" => add_prefix("lecture_06", [
75+
"Lecture" => "lecture.md",
76+
"Lab" => "lab.md",
77+
"Homework" => "hw.md",
78+
]),
79+
"7: Macros" => add_prefix("lecture_07", [
80+
"Lecture" => "lecture.md",
81+
"Lab" => "lab.md",
82+
"Homework" => "hw.md",
83+
]),
84+
"8: Automatic differentiation" => add_prefix("lecture_08", [
85+
"Lecture" => "lecture.md",
86+
"Lab" => "lab.md",
87+
"Homework" => "hw.md",
88+
]),
89+
"9: Intermediate representation" => add_prefix("lecture_09", [
90+
"Lecture" => "lecture.md",
91+
"Lab" => "lab.md",
92+
]),
93+
"10: Parallel programming" => add_prefix("lecture_10", [
94+
"Lecture" => "lecture.md",
95+
"Lab" => "lab.md",
96+
"Homework" => "hw.md",
97+
]),
98+
"11: GPU programming" => add_prefix("lecture_11", [
99+
"Lecture" => "lecture.md",
100+
"Lab" => "lab.md",
101+
]),
102+
"12: Ordinary Differential Equations" => add_prefix("lecture_12", [
103+
"Lecture" => "lecture.md",
104+
"Lab" => "lab.md",
105+
"Homework" => "hw.md",
106+
]),
107+
]),
109108
]
110109

110+
# documentation
111+
organisation = "JuliaTeachingCTU"
112+
repository = "Scientific-Programming-in-Julia"
113+
repo = Remotes.GitHub(organisation, repository)
111114

112115
makedocs(;
113-
authors = "JuliaTeachingCTU",
114-
# repo = "https://github.com/JuliaTeachingCTU/Scientific-Programming-in-Julia/blob/{commit}{path}#{line}",
115-
sitename = "Scientific Programming in Julia",
116-
pagesonly = true,
117-
format = Documenter.HTML(;
118-
prettyurls = true,
119-
canonical = "https://JuliaTeachingCTU.github.io/Scientific-Programming-in-Julia",
120-
assets = ["assets/favicon.ico"],
121-
collapselevel = 1,
122-
ansicolor=true,
123-
mathengine=Documenter.MathJax3(),
116+
modules=[Scientific_Programming_in_Julia],
117+
authors=organisation,
118+
repo=repo,
119+
sitename="Scientific Programming in Julia",
120+
format=DocumenterVitepress.MarkdownVitepress(;
121+
repo=Remotes.repourl(repo),
122+
VITREPRESS_KWARGS...,
124123
),
125-
pages
124+
pages=pages,
125+
warnonly=true,
126+
MAKEDOCS_KWARGS...,
126127
)
128+
127129
deploydocs(;
128-
repo = "github.com/JuliaTeachingCTU/Scientific-Programming-in-Julia",
130+
repo=repo,
131+
target="build",
132+
devbranch="main",
133+
branch="gh-pages",
134+
push_preview=true,
129135
)

0 commit comments

Comments
 (0)