File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ hexo.on("ready", async () => {
65
65
hexo . locals . set ( `cdnTestStatus_cdnjs` , 404 ) ;
66
66
hexo . locals . set ( `cdnTestStatus_sustech` , 404 ) ;
67
67
hexo . locals . set ( `cdnTestStatus_zstatic` , 404 ) ;
68
+ hexo . locals . set ( `cdnTestStatus_npmMirror` , 404 ) ;
68
69
}
69
70
} ) ;
70
71
@@ -112,8 +113,19 @@ function checkVersionAndCDNAvailability(data) {
112
113
) ;
113
114
}
114
115
116
+ if ( data . npmMirrorCDN ) {
117
+ hexo . log . info (
118
+ `\x1b[32m%s\x1b[0m` ,
119
+ `CDN available: NPMMirror (Recommended)` ,
120
+ ) ;
121
+ hexo . locals . set ( `cdnTestStatus_npmMirror` , 200 ) ;
122
+ } else {
123
+ hexo . log . warn ( `\x1b[31m%s\x1b[0m` , `NPMMirror CDN is unavailable yet.` ) ;
124
+ hexo . locals . set ( `cdnTestStatus_npmMirror` , 404 ) ;
125
+ }
126
+
115
127
if ( data . zstaticCDN ) {
116
- hexo . log . info ( `\x1b[32m%s\x1b[0m` , `CDN available: ZStatic (Recommended) ` ) ;
128
+ hexo . log . info ( `\x1b[32m%s\x1b[0m` , `CDN available: ZStatic` ) ;
117
129
hexo . locals . set ( `cdnTestStatus_zstatic` , 200 ) ;
118
130
} else {
119
131
hexo . log . warn ( `\x1b[31m%s\x1b[0m` , `ZStatic CDN is unavailable yet.` ) ;
You can’t perform that action at this time.
0 commit comments