Skip to content

Commit 1069fa1

Browse files
authored
Merge pull request #494 from JuliaDataCubes/la/docs
up versions
2 parents 7aec69c + 9cc1375 commit 1069fa1

File tree

5 files changed

+60
-183
lines changed

5 files changed

+60
-183
lines changed

docs/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
"docs:preview": "vitepress preview build/.documenter"
66
},
77
"devDependencies": {
8+
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.14.0",
89
"@types/d3-format": "^3.0.4",
9-
"@types/node": "^22.10.1",
10+
"@types/node": "^22.13.4",
1011
"markdown-it-mathjax3": "^4.3.2",
11-
"rollup-plugin-delete": "^2.0.0",
12-
"vitepress": "^1.5.0",
13-
"vitepress-plugin-tabs": "^0.5.0"
12+
"rollup-plugin-delete": "^3.0.0",
13+
"vitepress": "^1.6.3",
14+
"vitepress-plugin-tabs": "^0.6.0"
1415
},
1516
"dependencies": {
1617
"d3-format": "^3.1.0",

docs/src/.vitepress/config.mts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,25 @@ export default defineConfig({
9090
['script', {src: `${baseTemp.base}siteinfo.js`}]
9191
],
9292
// ignoreDeadLinks: true,
93-
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+
},
94112
markdown: {
95113
math: true,
96114
config(md) {

docs/src/.vitepress/theme/index.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,41 @@
11
// .vitepress/theme/index.ts
22
import { h } from 'vue'
3-
import type { Theme } from 'vitepress'
43
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+
511
import AsideTrustees from '../../components/AsideTrustees.vue'
612
import VersionPicker from "../../components/VersionPicker.vue"
713
import StarUs from '../../components/StarUs.vue'
8-
14+
import AuthorBadge from '../../components/AuthorBadge.vue'
15+
import Authors from '../../components/Authors.vue'
916
import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'
17+
18+
import '@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css'
1019
import './style.css'
1120

12-
export default {
21+
export const Theme: ThemeConfig = {
1322
extends: DefaultTheme,
1423
Layout() {
1524
return h(DefaultTheme.Layout, null, {
1625
'aside-ads-before': () => h(AsideTrustees),
17-
'nav-bar-content-after': () => h(StarUs),
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),
1832
})
1933
},
2034
enhanceApp({ app, router, siteData }) {
2135
enhanceAppWithTabs(app);
2236
app.component('VersionPicker', VersionPicker);
37+
app.component('AuthorBadge', AuthorBadge)
38+
app.component('Authors', Authors)
2339
}
24-
} satisfies Theme
40+
}
41+
export default Theme

docs/src/.vitepress/theme/style.css

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ This is pretty bad for Julia folks reading even though copy+paste retains the sa
3737
*/
3838
/* Target elements with class 'mono' */
3939
.mono-no-substitutions {
40-
font-family: "JuliaMono-Light", monospace;
40+
font-family: "JuliaMono-Regular", monospace;
4141
font-feature-settings: "calt" off;
4242
}
4343

4444
/* Alternatively, you can use the following if you prefer: */
4545
.mono-no-substitutions-alt {
46-
font-family: "JuliaMono-Light", monospace;
46+
font-family: "JuliaMono-Regular", monospace;
4747
font-variant-ligatures: none;
4848
}
4949

5050
/* If you want to apply this globally to all monospace text: */
5151
pre, code {
52-
font-family: "JuliaMono-Light", monospace;
52+
font-family: "JuliaMono-Regular", monospace;
5353
font-feature-settings: "calt" off;
5454
}
5555

@@ -200,36 +200,15 @@ mjx-container > svg {
200200
--vitest-c-sponsor-hover: #e51370;
201201
}
202202

203-
.VPDoc.has-aside .content-container {
204-
max-width: 100% !important;
205-
}
206-
.aside {
207-
max-width: 200px !important;
208-
padding-left: 0 !important;
209-
}
210-
.VPDoc {
211-
padding-top: 15px !important;
212-
padding-left: 5px !important;
213-
214-
}
215-
/* This one does the right menu */
216-
217-
.VPDocOutlineItem li {
218-
text-overflow: ellipsis;
219-
overflow: hidden;
220-
white-space: nowrap;
221-
max-width: 200px;
222-
}
223-
224-
.VPNavBar .title {
225-
text-overflow: ellipsis;
226-
overflow: hidden;
227-
white-space: nowrap;
203+
@media (min-width: 640px) {
204+
:root {
205+
--vp-home-hero-image-filter: blur(56px);
206+
}
228207
}
229208

230-
@media (max-width: 960px) {
231-
.VPDoc {
232-
padding-left: 25px !important;
209+
@media (min-width: 960px) {
210+
:root {
211+
--vp-home-hero-image-filter: blur(72px);
233212
}
234213
}
235214

@@ -278,4 +257,8 @@ mjx-container > svg {
278257
cursor: pointer;
279258
user-select: none;
280259
margin: 0 0 8px;
260+
}
261+
262+
.jldocstring.custom-block summary a {
263+
pointer-events: none;
281264
}

docs/src/components/VersionPicker.vue

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

0 commit comments

Comments
 (0)