File tree 11 files changed +65
-88
lines changed
docs/pages/docs/docs-theme
11 files changed +65
-88
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' nextra-theme-docs ' : major
3
+ ---
4
+
5
+ rename ` primaryHue ` and ` primarySaturation ` theme options to ` color.hue ` and ` color.saturation `
Original file line number Diff line number Diff line change @@ -199,7 +199,11 @@ module.exports = {
199
199
files : 'examples/swr-site/**' ,
200
200
settings : {
201
201
tailwindcss : {
202
- config : 'examples/swr-site/tailwind.config.js'
202
+ config : 'examples/swr-site/tailwind.config.js' ,
203
+ cssFiles : [
204
+ 'examples/swr-site/styles.css' ,
205
+ 'packages/nextra-theme-docs/dist/style.css'
206
+ ]
203
207
} ,
204
208
next : { rootDir : 'examples/swr-site' }
205
209
}
Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ node_modules/
5
5
dist /
6
6
.turbo /
7
7
out /
8
- # Theme styles
9
- packages /nextra-theme- * /style.css
10
8
11
9
# Stork related
12
10
* /** /public /* .st
Original file line number Diff line number Diff line change @@ -199,12 +199,12 @@ saturation values for light and dark themes.
199
199
<OptionTable
200
200
options = { [
201
201
[
202
- ' primaryHue ' ,
202
+ ' color.hue ' ,
203
203
' number | { dark: number; light: number }' ,
204
204
' The hue of the primary theme color.'
205
205
],
206
206
[
207
- ' primarySaturation ' ,
207
+ ' color.saturation ' ,
208
208
' number | { dark: number; light: number }' ,
209
209
' The saturation of the primary theme color.'
210
210
]
@@ -233,7 +233,7 @@ export const hue = (
233
233
)
234
234
}}
235
235
/>
236
- <code className = " w-14 text-sm text-gray-500" />
236
+ <label className = " text-sm text-gray-500 w-14 " />
237
237
</div >
238
238
)
239
239
@@ -253,7 +253,7 @@ export const saturation = (
253
253
)
254
254
}}
255
255
/>
256
- <code className = " text-sm text-gray-500 w-14" />
256
+ <label className = " text-sm text-gray-500 w-14" />
257
257
</div >
258
258
)
259
259
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export function Blog() {
17
17
{ page . frontMatter ?. description }
18
18
< Link
19
19
href = { page . route }
20
- className = "block nx-text -primary-600 underline underline-offset-2 decoration-from-font"
20
+ className = "block _text -primary-600 underline underline-offset-2 decoration-from-font"
21
21
>
22
22
Read more →
23
23
</ Link >
Original file line number Diff line number Diff line change 1
1
@tailwind utilities;
2
2
3
- .docs-search > span {
4
- width : 100% ;
5
- }
6
-
7
- .algolia-autocomplete .algolia-docsearch-suggestion--category-header span {
8
- display : inline-block;
9
- }
10
- .algolia-autocomplete .ds-dropdown-menu {
11
- width : 500px ;
12
- min-width : 300px ;
13
- max-width : calc (100vw - 50px );
14
- }
15
-
16
3
.dark .invert-on-dark {
17
4
filter : invert (1 ) brightness (1.8 );
18
5
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export function Head(): ReactElement {
14
14
// `head` can be either FC or ReactNode. We have to directly call it if it's an
15
15
// FC because hooks like Next.js' `useRouter` aren't allowed inside NextHead.
16
16
const head = typeof config . head === 'function' ? config . head ( { } ) : config . head
17
- const { primaryHue : hue , primarySaturation : saturation } = config
17
+ const { hue, saturation } = config . color
18
18
const { dark : darkHue , light : lightHue } =
19
19
typeof hue === 'number' ? { dark : hue , light : hue } : hue
20
20
const { dark : darkSaturation , light : lightSaturation } =
Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ export const DEFAULT_THEME: DocsThemeConfig = {
49
49
</ >
50
50
)
51
51
} ,
52
+ color : {
53
+ hue : {
54
+ dark : 204 ,
55
+ light : 212
56
+ } ,
57
+ saturation : 100
58
+ } ,
52
59
darkMode : true ,
53
60
direction : 'ltr' ,
54
61
docsRepositoryBase : 'https://github.com/shuding/nextra' ,
@@ -120,14 +127,6 @@ export const DEFAULT_THEME: DocsThemeConfig = {
120
127
content : 'Submit an issue about broken link →' ,
121
128
labels : 'bug'
122
129
} ,
123
- primaryHue : {
124
- dark : 204 ,
125
- light : 212
126
- } ,
127
- primarySaturation : {
128
- dark : 100 ,
129
- light : 100
130
- } ,
131
130
project : {
132
131
icon : (
133
132
< >
Original file line number Diff line number Diff line change @@ -100,18 +100,20 @@ export const themeSchema = /* @__PURE__ */ (() =>
100
100
content : z . custom < ReactNode | FC > ( ...reactNode ) ,
101
101
labels : z . string ( )
102
102
} ) ,
103
- primaryHue : z . number ( ) . or (
104
- z . strictObject ( {
105
- dark : z . number ( ) ,
106
- light : z . number ( )
107
- } )
108
- ) ,
109
- primarySaturation : z . number ( ) . or (
110
- z . strictObject ( {
111
- dark : z . number ( ) ,
112
- light : z . number ( )
113
- } )
114
- ) ,
103
+ color : z . strictObject ( {
104
+ hue : z . number ( ) . or (
105
+ z . strictObject ( {
106
+ dark : z . number ( ) ,
107
+ light : z . number ( )
108
+ } )
109
+ ) ,
110
+ saturation : z . number ( ) . or (
111
+ z . strictObject ( {
112
+ dark : z . number ( ) ,
113
+ light : z . number ( )
114
+ } )
115
+ )
116
+ } ) ,
115
117
project : z . strictObject ( {
116
118
icon : z . custom < ReactNode | FC > ( ...reactNode ) ,
117
119
link : z . string ( ) . startsWith ( 'https://' ) . optional ( )
Original file line number Diff line number Diff line change @@ -97,6 +97,18 @@ const nextra: Nextra = nextraConfig => {
97
97
}
98
98
}
99
99
100
+ // Fixes https://github.com/vercel/next.js/issues/55872
101
+ if ( config . watchOptions . ignored instanceof RegExp ) {
102
+ const ignored = config . watchOptions . ignored . source
103
+
104
+ config . watchOptions = {
105
+ ...config . watchOptions ,
106
+ ignored : new RegExp (
107
+ ignored . replace ( '(\\.(git|next)|node_modules)' , '\\.(git|next)' )
108
+ )
109
+ }
110
+ }
111
+
100
112
const defaultESMAppPath = require . resolve ( 'next/dist/esm/pages/_app.js' )
101
113
const defaultCJSAppPath = require . resolve ( 'next/dist/pages/_app.js' )
102
114
You can’t perform that action at this time.
0 commit comments