File tree Expand file tree Collapse file tree 6 files changed +17753
-16
lines changed Expand file tree Collapse file tree 6 files changed +17753
-16
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import Theme from './theme.js' ;
2
2
3
3
export default function ThemeSwitch ( { component } ) {
4
- if ( component == undefined ) {
4
+ if ( component = == undefined ) {
5
5
component = document ;
6
6
}
7
- component . querySelectorAll ( `.theme-switch-light` ) . forEach ( ( button ) => {
8
- button . addEventListener ( 'click' , function ( event ) {
7
+
8
+ component . querySelectorAll ( '.theme-switch-light' ) . forEach ( ( button ) => {
9
+ button . addEventListener ( 'click' , function ( event ) {
9
10
event . preventDefault ( ) ;
10
- Theme ( { component, style : 'light-theme' } ) ;
11
+ Theme ( { component, style : 'light-theme' } ) ;
11
12
} ) ;
12
13
} ) ;
13
14
14
- component . querySelectorAll ( ` .theme-switch-dark` ) . forEach ( ( button ) => {
15
- button . addEventListener ( 'click' , function ( event ) {
15
+ component . querySelectorAll ( ' .theme-switch-dark' ) . forEach ( ( button ) => {
16
+ button . addEventListener ( 'click' , function ( event ) {
16
17
event . preventDefault ( ) ;
17
- Theme ( { component, style : 'dark-theme' } ) ;
18
+ Theme ( { component, style : 'dark-theme' } ) ;
18
19
} ) ;
19
20
} ) ;
20
21
}
Original file line number Diff line number Diff line change @@ -56,14 +56,25 @@ outputFormats:
56
56
isPlainText : true
57
57
58
58
build :
59
- # Ensure Hugo correctly processes JavaScript modules
60
- jsConfig :
61
- nodeEnv : " development"
59
+ # Configure JavaScript build settings for ES6 modules
60
+ writeStats : true
61
+ useResourceCacheWhen : " fallback"
62
+
63
+ # Asset processing configuration
64
+ assetDir : " assets"
62
65
63
66
module :
64
67
mounts :
65
68
- source : assets
66
69
target : assets
67
-
68
70
- source : node_modules
69
- target : assets/node_modules
71
+ target : assets/node_modules
72
+
73
+ # Ensure proper JavaScript processing in development
74
+ minify :
75
+ disableJS : true
76
+ minifyOutput : false
77
+
78
+ # Development settings
79
+ params :
80
+ env : development
You can’t perform that action at this time.
0 commit comments