Skip to content

Commit c7222ee

Browse files
committed
Updates to documentation
1 parent 718dfb3 commit c7222ee

File tree

19 files changed

+319
-824
lines changed

19 files changed

+319
-824
lines changed

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
33
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
4+
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
45
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
56
NASAPrecipitation = "a018b980-0677-41c0-b9a4-7f34595c2b14"
67
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

docs/make.jl

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Documenter
2+
using DocumenterVitepress
23
using NASAPrecipitation
34
using Literate
45

@@ -11,31 +12,30 @@ setup(
1112
)
1213

1314
makedocs(;
14-
modules = [NASAPrecipitation, GeoRegions],
15-
doctest = false,
16-
warnonly = true,
17-
format = Documenter.HTML(collapselevel=1,prettyurls=false),
15+
modules = [NASAPrecipitation],
1816
authors = "Nathanael Wong <natgeo.wong@outlook.com>",
1917
sitename = "NASAPrecipitation.jl",
18+
doctest = false,
19+
warnonly = true,
20+
format = DocumenterVitepress.MarkdownVitepress(
21+
repo = "https://github.com/GeoRegionsEcosystem/NASAPrecipitation.jl",
22+
),
2023
pages = [
21-
"Home" => "index.md",
22-
"NASAPrecipitation Datasets" => [
23-
"What is a NASA Precipitation Dataset?" => "nasaprecipitation/intro.md",
24-
"Defining NASA Precipitation Datasets" => "nasaprecipitation/define.md",
25-
"GPM IMERG Datasets" => "nasaprecipitation/imerg.md",
26-
"TRMM TMPA Datasets" => "nasaprecipitation/trmm.md",
27-
"Dummy Datasets" => "nasaprecipitation/dummy.md",
28-
],
29-
"Using NASAPrecipitation.jl" => [
30-
"Integration with GeoRegions.jl" => "using/georegions.md",
31-
"LandSea Datasets: GPM and TRMM" => [
32-
"What is a LandSea Dataset?" => "using/landsea/intro.md",
33-
"Loading LandSea Datasets" => "using/landsea/create.md",
34-
],
35-
"Downloading and Reading Datasets" => "using/download.md",
36-
"Extraction of subGeoRegions" => "using/extract.md",
37-
"Spatialtemporal Smoothing" => "using/smoothing.md",
38-
],
24+
"Home" => "index.md",
25+
"The Basics" => "basics.md",
26+
# "Datasets" => [
27+
# "Available Datasets" => "datasets/intro.md",
28+
# "Defining a NPD" => "datasets/define.md",
29+
# "GPM IMERG Datasets" => "datasets/imerg.md",
30+
# "TRMM TMPA Datasets" => "datasets/trmm.md",
31+
# "Dummy Datasets" => "datasets/dummy.md",
32+
# ],
33+
# "Tutorials" => [
34+
# "Integration with LandSea.jl" => "using/landsea.md",
35+
# "Downloading Datasets" => "using/download.md",
36+
# "Extraction of subGeoRegions" => "using/extract.md",
37+
# "Spatialtemporal Smoothing" => "using/smoothing.md",
38+
# ],
3939
],
4040
)
4141

@@ -54,6 +54,8 @@ for file in files
5454
end
5555

5656
deploydocs(
57-
repo = "github.com/GeoRegionsEcosystem/NASAPrecipitation.jl.git",
58-
devbranch = "main"
57+
repo = "github.com/GeoRegionsEcosystem/NASAPrecipitation.jl.git",
58+
target = "build", # this is where Vitepress stores its output
59+
devbranch = "main",
60+
branch = "gh-pages",
5961
)
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
/* Customize default theme styling by overriding CSS variables:
2+
https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
3+
*/
4+
5+
/* Layouts */
6+
7+
.VPHero .clip {
8+
white-space: pre;
9+
max-width: 500px;
10+
}
11+
12+
/* Fonts */
13+
14+
@font-face {
15+
font-family: JuliaMono-Regular;
16+
src: url("https://cdn.jsdelivr.net/gh/cormullion/juliamono/webfonts/JuliaMono-Regular.woff2");
17+
}
18+
19+
:root {
20+
/* Typography */
21+
--vp-font-family-base: "Barlow", "Inter var experimental", "Inter var",
22+
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
23+
Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
24+
25+
/* Code Snippet font */
26+
--vp-font-family-mono: JuliaMono-Regular, monospace;
27+
28+
/*
29+
Disable the 'calt' (contextual alternates, often called ligatures) font feature
30+
for monospaced text, which is usually enabled by default. This feature changes
31+
the display of character combinations such "-" + ">", and "|" + ">". These can
32+
be confusing for beginners, particularly if the font has 'unusual' designs.
33+
*/
34+
font-feature-settings: "calt" 0;
35+
}
36+
37+
.mono {
38+
pre {
39+
font-family: JuliaMono-Light;
40+
}
41+
42+
code {
43+
font-family: JuliaMono-Light;
44+
}
45+
}
46+
47+
/* Colors */
48+
49+
:root {
50+
--julia-blue: #4063d8;
51+
--julia-purple: #9558b2;
52+
--julia-red: #cb3c33;
53+
--julia-green: #389826;
54+
55+
--vp-c-brand: #389826;
56+
--vp-c-brand-light: #3dd027;
57+
--vp-c-brand-lighter: #9499ff;
58+
--vp-c-brand-lightest: #bcc0ff;
59+
--vp-c-brand-dark: #535bf2;
60+
--vp-c-brand-darker: #454ce1;
61+
--vp-c-brand-dimm: #212425;
62+
}
63+
64+
/* Component: Button */
65+
66+
:root {
67+
--vp-button-brand-border: var(--vp-c-brand-light);
68+
--vp-button-brand-text: var(--vp-c-white);
69+
--vp-button-brand-bg: var(--vp-c-brand);
70+
--vp-button-brand-hover-border: var(--vp-c-brand-light);
71+
--vp-button-brand-hover-text: var(--vp-c-white);
72+
--vp-button-brand-hover-bg: var(--vp-c-brand-light);
73+
--vp-button-brand-active-border: var(--vp-c-brand-light);
74+
--vp-button-brand-active-text: var(--vp-c-white);
75+
--vp-button-brand-active-bg: var(--vp-button-brand-bg);
76+
}
77+
78+
/* Component: Home */
79+
80+
:root {
81+
--vp-home-hero-name-color: transparent;
82+
--vp-home-hero-name-background: -webkit-linear-gradient(
83+
120deg,
84+
#4166DE 30%,
85+
#97A8DF
86+
);
87+
}
88+
89+
@media (min-width: 640px) {
90+
:root {
91+
--vp-home-hero-image-filter: blur(56px);
92+
}
93+
}
94+
95+
@media (min-width: 960px) {
96+
:root {
97+
--vp-home-hero-image-filter: blur(72px);
98+
}
99+
}
100+
101+
/* Component: Custom Block */
102+
103+
:root.dark {
104+
--vp-custom-block-tip-border: var(--vp-c-brand);
105+
--vp-custom-block-tip-text: var(--vp-c-brand-lightest);
106+
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
107+
108+
/* // Tweak the color palette for blacks and dark grays */
109+
--vp-c-black: hsl(220 20% 9%);
110+
--vp-c-black-pure: hsl(220, 24%, 4%);
111+
--vp-c-black-soft: hsl(220 16% 13%);
112+
--vp-c-black-mute: hsl(220 14% 17%);
113+
--vp-c-gray: hsl(220 8% 56%);
114+
--vp-c-gray-dark-1: hsl(220 10% 39%);
115+
--vp-c-gray-dark-2: hsl(220 12% 28%);
116+
--vp-c-gray-dark-3: hsl(220 12% 23%);
117+
--vp-c-gray-dark-4: hsl(220 14% 17%);
118+
--vp-c-gray-dark-5: hsl(220 16% 13%);
119+
120+
/* // Backgrounds */
121+
/* --vp-c-bg: hsl(240, 2%, 11%); */
122+
--vp-custom-block-info-bg: hsl(220 14% 17%);
123+
/* --vp-c-gutter: hsl(220 20% 9%);
124+
125+
--vp-c-bg-alt: hsl(220 20% 9%);
126+
--vp-c-bg-soft: hsl(220 14% 17%);
127+
--vp-c-bg-mute: hsl(220 12% 23%);
128+
*/
129+
}
130+
131+
/* Component: Algolia */
132+
133+
.DocSearch {
134+
--docsearch-primary-color: var(--vp-c-brand) !important;
135+
}
136+
137+
/* Component: MathJax */
138+
139+
mjx-container > svg {
140+
display: block;
141+
margin: auto;
142+
}
143+
144+
mjx-container {
145+
padding: 0.5rem 0;
146+
}
147+
148+
mjx-container {
149+
display: inline;
150+
margin: auto 2px -2px;
151+
}
152+
153+
mjx-container > svg {
154+
margin: auto;
155+
display: inline;
156+
}
157+
158+
/**
159+
* Change images from light to dark theme
160+
* -------------------------------------------------------------------------- */
161+
162+
:root:not(.dark) .dark-only {
163+
display: none;
164+
}
165+
166+
:root:is(.dark) .light-only {
167+
display: none;
168+
}
169+
170+
.VPNavBar {
171+
padding-right: 0px !important;
172+
}
173+
174+
.VPDoc.has-aside .content-container {
175+
max-width: 100% !important;
176+
}
177+
178+
.aside {
179+
max-width: 200px !important;
180+
padding-left: 0 !important;
181+
}
182+
183+
/* This one does the right menu */
184+
185+
.VPDocOutlineItem li {
186+
text-overflow: ellipsis;
187+
overflow: hidden;
188+
white-space: nowrap;
189+
max-width: 300px;
190+
}
191+
192+
.VPNavBar .title {
193+
text-overflow: ellipsis;
194+
overflow: hidden;
195+
white-space: nowrap;
196+
}
197+
198+
/* Component: Docstring Custom Block */
199+
200+
.jldocstring.custom-block {
201+
border: 1px solid var(--vp-c-gray-2);
202+
color: var(--vp-c-text-1);
203+
}
204+
205+
.jldocstring.custom-block summary {
206+
font-weight: 700;
207+
cursor: pointer;
208+
user-select: none;
209+
margin: 0 0 8px;
210+
}

docs/src/basics.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# The Basics of NASAPrecipitation.jl
2+
3+
There are two essential components in NASAPrecipitation.jl
4+
5+
* A NASA precipitation dataset of interest (i.e., a NASAPrecipitationDataset `npd`)
6+
* A geographic region of interest (i.e., a GeoRegion `geo`)
7+
8+
With these two components, you can perform the following actions:
9+
10+
* Download data of interest using `download(npd,geo)`
11+
* Perform basic analysis on the data using `analysis(npd,geo)`
12+
* Manipulate the data (e.g., spatiotemporal smoothing using `smooth(npd,geo,...)`)
13+
14+
## The `NASAPrecipitationDataset` Type
15+
16+
All `NASAPrecipitationDataset` types _(except for the Dummy types)_ contain the following information:
17+
* `start` - The beginning of the date-range of our data of interest
18+
* `stop` - The end of the date-range of our data of interest
19+
* `path` - The data directory in which our dataset is saved into
20+
21+
```@docs
22+
NASAPrecipitation.NASAPrecipitationDataset
23+
```
24+
25+
## The `AbstractGeoRegion` Type
26+
27+
A `GeoRegion` defines the geometry/geometries of geograhical region(s) of interest. See the [documentation of GeoRegions.jl](https://georegionsecosystem.github.io/GeoRegions.jl/dev/georegions) for more information.
28+
29+
```@docs
30+
GeoRegions.AbstractGeoRegion
31+
```

0 commit comments

Comments
 (0)