11import originalThemePlugin from './original-theme/originalThemePlugin.js' ;
22import mobileThemePlugin from './mobile-theme/mobileThemePlugin.js' ;
3+ import themeSwitchPlugin from './theme-switch/themeSwitchPlugin.js' ;
34import addLinkRefsPlugin from './pre-process/AddLinksPlugin.js' ;
45import pageIdAndInfoPlugin from './page-id/PageIdPlugin.js' ;
56import sortByDayNumberPlugin from './page-id/sortByDayNumberPlugin.js' ;
@@ -9,21 +10,7 @@ import importMapPlugin from './client-js/importMapPlugin.js';
910import baseUrlShortcodePlugin from './shortcode/baseUrlShortcodePlugin.js' ;
1011import searchIdShortcodePlugin from './shortcode/searchIdShortcodePlugin.js' ;
1112import customCollectionsPlugin from './page-id/customCollectionsPlugin.js' ;
12-
13- /**
14- * Load original or mobile theme, depending on `_THEME` environment variable.
15- */
16- function themeSwitchPlugin ( eleventyConfig , options ) {
17- const isMobile = ( process . env . _THEME === 'mobile' ) ;
18-
19- console . log ( 'themeSwitchPlugin:' , process . env . _THEME ) ;
20-
21- if ( isMobile ) {
22- return mobileThemePlugin ( eleventyConfig , options ) ;
23- } else {
24- return originalThemePlugin ( eleventyConfig , options ) ;
25- }
26- }
13+ import loadEnvJs from './utilities/loadEnvJs.js' ;
2714
2815/**
2916 * Load all plugins in the collection.
@@ -53,7 +40,8 @@ export {
5340 originalThemePlugin , mobileThemePlugin , themeSwitchPlugin ,
5441 addLinkRefsPlugin , pageIdAndInfoPlugin , sortByDayNumberPlugin ,
5542 clientJsPlugin , importMapPlugin , baseUrlShortcodePlugin , debugFiltersPlugin ,
56- customCollectionsPlugin
43+ customCollectionsPlugin , searchIdShortcodePlugin ,
44+ loadEnvJs
5745} ;
5846
5947export default diaPluginLoader ;
0 commit comments