Skip to content

Commit 89b65c5

Browse files
author
Documenter.jl
committed
build based on ef6d4ac
1 parent f46cd81 commit 89b65c5

File tree

271 files changed

+14325
-0
lines changed

Some content is hidden

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

271 files changed

+14325
-0
lines changed
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
import { defineConfig } from 'vitepress'
2+
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
3+
import mathjax3 from "markdown-it-mathjax3";
4+
5+
function getBaseRepository(base: string): string {
6+
if (!base || base === '/') return '/';
7+
const parts = base.split('/').filter(Boolean);
8+
return parts.length > 0 ? `/${parts[0]}/` : '/';
9+
}
10+
11+
const baseTemp = {
12+
base: '/YAXArrays.jl/previews/PR503/',
13+
}
14+
15+
const navTemp = {
16+
nav: [
17+
{ text: 'Home', link: '/' },
18+
{ text: 'Get Started', link: '/get_started' },
19+
{
20+
text: 'User Guide',
21+
items: [
22+
{ text: 'Types', link: '/UserGuide/types' },
23+
{ text: 'Read', link: '/UserGuide/read' },
24+
{ text: 'Write', link: '/UserGuide/write' },
25+
{ text: 'Convert', link: '/UserGuide/convert' },
26+
{ text: 'Create', link: '/UserGuide/create' },
27+
{ text: 'Select', link: '/UserGuide/select' },
28+
{ text: 'Compute', link: '/UserGuide/compute' },
29+
{ text: 'Chunk', link: '/UserGuide/chunk' },
30+
{ text: 'Cache', link: '/UserGuide/cache' },
31+
{ text: 'Group', link: '/UserGuide/group' },
32+
{ text: 'Combine', link: '/UserGuide/combine' },
33+
{ text: 'FAQ', link: '/UserGuide/faq' }
34+
]
35+
},
36+
{
37+
text: 'Tutorials',
38+
items: [
39+
{ text: 'Plotting maps', link: '/tutorials/plottingmaps' },
40+
{ text: 'Mean Seasonal Cycle', link: '/tutorials/mean_seasonal_cycle' },
41+
{
42+
text: 'ESDL studies',
43+
items: [
44+
{ text: 'ESDL study 1', link: 'https://github.com/JuliaDataCubes/YAXArrays.jl/blob/master/docs/src/tutorials/esdl/examples_from_esdl_study_1.jl' },
45+
{ text: 'ESDL study 2', link: 'https://github.com/JuliaDataCubes/YAXArrays.jl/blob/master/docs/src/tutorials/esdl/examples_from_esdl_study_2.jl' },
46+
{ text: 'ESDL study 3', link: 'https://github.com/JuliaDataCubes/YAXArrays.jl/blob/master/docs/src/tutorials/esdl/examples_from_esdl_study_3.jl' },
47+
{ text: 'ESDL study 4', link: 'https://github.com/JuliaDataCubes/YAXArrays.jl/blob/master/docs/src/tutorials/esdl/examples_from_esdl_study_4.jl' },
48+
]
49+
},
50+
{ text: 'Other Tutorials', link: '/tutorials/other_tutorials' },
51+
]
52+
},
53+
{ text: 'Ecosystem',
54+
items: [
55+
{ text: 'DimensionalData.jl', link: 'https://rafaqz.github.io/DimensionalData.jl/dev/' },
56+
{ text: 'NetCDF.jl', link: 'https://juliageo.org/NetCDF.jl/stable/'},
57+
{ text: 'Zarr.jl', link: 'https://juliaio.github.io/Zarr.jl/latest/'},
58+
{ text: 'ArchGDAL.jl', link: 'https://yeesian.com/ArchGDAL.jl/stable/' },
59+
{ text: 'GeoMakie.jl', link: 'https://geo.makie.org/dev/' },
60+
{ text: 'Makie.jl', link: 'https://docs.makie.org/dev/' },
61+
]
62+
},
63+
{
64+
text: 'Development',
65+
items: [
66+
{ text: 'Contribute', link: 'development/contribute' },
67+
{ text: 'Contributors', link: 'development/contributors' }
68+
]
69+
},
70+
],
71+
}
72+
73+
const nav = [
74+
...navTemp.nav,
75+
{
76+
component: 'VersionPicker'
77+
}
78+
]
79+
// https://vitepress.dev/reference/site-config
80+
export default defineConfig({
81+
base: '/YAXArrays.jl/previews/PR503/',
82+
title: "YAXArrays.jl",
83+
description: "Yet another xarray-like Julia package",
84+
lastUpdated: true,
85+
// cleanUrls: true,
86+
outDir: '../1', // This is required for MarkdownVitepress to work correctly...
87+
head: [
88+
['link', { rel: 'icon', href: '/favicon.ico' }],
89+
['script', {src: `${getBaseRepository(baseTemp.base)}versions.js`}],
90+
['script', {src: `${baseTemp.base}siteinfo.js`}]
91+
],
92+
// ignoreDeadLinks: true,
93+
vite: {
94+
build: {
95+
assetsInlineLimit: 0, // so we can tell whether we have created inlined images or not, we don't let vite inline them
96+
},
97+
optimizeDeps: {
98+
exclude: [
99+
'@nolebase/vitepress-plugin-enhanced-readabilities/client',
100+
'vitepress',
101+
'@nolebase/ui',
102+
],
103+
},
104+
ssr: {
105+
noExternal: [
106+
// If there are other packages that need to be processed by Vite, you can add them here.
107+
'@nolebase/vitepress-plugin-enhanced-readabilities',
108+
'@nolebase/ui',
109+
],
110+
},
111+
},
112+
markdown: {
113+
math: true,
114+
config(md) {
115+
md.use(tabsMarkdownPlugin),
116+
md.use(mathjax3)
117+
},
118+
theme: {
119+
light: "github-light",
120+
dark: "github-dark"
121+
}
122+
},
123+
themeConfig: {
124+
outline: 'deep',
125+
// https://vitepress.dev/reference/default-theme-config
126+
logo: { src: '/logo.png', width: 24, height: 24 },
127+
search: {
128+
provider: 'local',
129+
options: {
130+
detailedView: true
131+
}
132+
},
133+
nav,
134+
sidebar: [
135+
{ text: 'Get Started', link: '/get_started' },
136+
{ text: 'API Reference', link: '/api' },
137+
{
138+
text: 'User Guide',
139+
items: [
140+
{ text: 'Types', link: '/UserGuide/types' },
141+
{ text: 'Read', link: '/UserGuide/read' },
142+
{ text: 'Write', link: '/UserGuide/write' },
143+
{ text: 'Convert', link: '/UserGuide/convert' },
144+
{ text: 'Create', link: '/UserGuide/create' },
145+
{ text: 'Select', link: '/UserGuide/select' },
146+
{ text: 'Compute', link: '/UserGuide/compute' },
147+
{ text: 'Chunk', link: '/UserGuide/chunk' },
148+
{ text: 'Cache', link: '/UserGuide/cache' },
149+
{ text: 'Group', link: '/UserGuide/group' },
150+
{ text: 'Combine', link: '/UserGuide/combine' },
151+
{ text: 'FAQ', link: '/UserGuide/faq' }
152+
]
153+
},
154+
{
155+
text: 'Tutorials',
156+
items: [
157+
{ text: 'Plotting maps', link: '/tutorials/plottingmaps' },
158+
{ text: 'Mean Seasonal Cycle', link: '/tutorials/mean_seasonal_cycle' },
159+
{ text: 'Other Tutorials', link: '/tutorials/other_tutorials' },
160+
]
161+
},
162+
{
163+
text: 'Development',
164+
items: [
165+
{ text: 'Contribute', link: 'development/contribute' },
166+
{ text: 'Contributors', link: 'development/contributors' }
167+
]
168+
},
169+
],
170+
editLink: {
171+
pattern: 'https://github.com/JuliaDataCubes/YAXArrays.jl/edit/master/docs/src/:path'
172+
},
173+
socialLinks: [
174+
// { icon: 'github', link: 'https://github.com/JuliaDataCubes/YAXArrays.jl' }
175+
],
176+
footer: {
177+
message: 'Made with <a href="https://github.com/LuxDL/DocumenterVitepress.jl" target="_blank"><strong>DocumenterVitepress.jl</strong></a>',
178+
copyright: `© Copyright ${new Date().getUTCFullYear()}. Released under the MIT License.`
179+
}
180+
}
181+
})
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.jldocstring.custom-block {
2+
border: 1px solid var(--vp-c-gray-2);
3+
color: var(--vp-c-text-1);
4+
overflow: hidden;
5+
}
6+
7+
.jldocstring.custom-block summary {
8+
font-weight: 700;
9+
cursor: pointer;
10+
user-select: none;
11+
margin: 0 0 8px;
12+
}
13+
.jldocstring.custom-block summary a {
14+
pointer-events: none;
15+
text-decoration: none;
16+
}
17+
18+
.jldocstring.custom-block .source-link {
19+
border: 1px solid var(--vp-c-gray-2);
20+
border-radius: 4px;
21+
text-decoration: none;
22+
background-color: #414040;
23+
float: right;
24+
opacity: 0;
25+
visibility: hidden;
26+
transform: translateY(-5px);
27+
transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
28+
}
29+
30+
.jldocstring.custom-block .source-link a {
31+
text-decoration: none;
32+
color: #e5e5e5;
33+
}
34+
35+
.jldocstring.custom-block .source-link a:hover {
36+
text-decoration: underline;
37+
}
38+
39+
.jldocstring.custom-block:hover .source-link {
40+
opacity: 1;
41+
visibility: visible;
42+
transform: translateY(0);
43+
}
44+
45+
@media (max-width: 768px) {
46+
.jldocstring.custom-block .source-link {
47+
opacity: 1;
48+
visibility: visible;
49+
transform: translateY(0);
50+
}
51+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// .vitepress/theme/index.ts
2+
import { h } from 'vue'
3+
import DefaultTheme from 'vitepress/theme'
4+
import type { Theme as ThemeConfig } from 'vitepress'
5+
6+
import {
7+
NolebaseEnhancedReadabilitiesMenu,
8+
NolebaseEnhancedReadabilitiesScreenMenu,
9+
} from '@nolebase/vitepress-plugin-enhanced-readabilities/client'
10+
11+
import AsideTrustees from '../../components/AsideTrustees.vue'
12+
import VersionPicker from "../../components/VersionPicker.vue"
13+
import StarUs from '../../components/StarUs.vue'
14+
import AuthorBadge from '../../components/AuthorBadge.vue'
15+
import Authors from '../../components/Authors.vue'
16+
import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'
17+
18+
import '@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css'
19+
import './style.css'
20+
21+
export const Theme: ThemeConfig = {
22+
extends: DefaultTheme,
23+
Layout() {
24+
return h(DefaultTheme.Layout, null, {
25+
'aside-ads-before': () => h(AsideTrustees),
26+
'nav-bar-content-after': () => [
27+
h(StarUs),
28+
h(NolebaseEnhancedReadabilitiesMenu), // Enhanced Readabilities menu
29+
],
30+
// A enhanced readabilities menu for narrower screens (usually smaller than iPad Mini)
31+
'nav-screen-content-after': () => h(NolebaseEnhancedReadabilitiesScreenMenu),
32+
})
33+
},
34+
enhanceApp({ app, router, siteData }) {
35+
enhanceAppWithTabs(app);
36+
app.component('VersionPicker', VersionPicker);
37+
app.component('AuthorBadge', AuthorBadge)
38+
app.component('Authors', Authors)
39+
}
40+
}
41+
export default Theme

0 commit comments

Comments
 (0)