@@ -25,18 +25,6 @@ import type { LocalProjectPage } from '../../project/types.js';
2525
2626const limitConnections = pLimit ( 5 ) ;
2727
28- /**
29- * Return true if any project in the current site has thebe configured.
30- * `project: jupyter: ...` aliases to `project: thebe`.
31- */
32- function siteUsesThebe ( session : ISession ) : boolean {
33- const state = session . store . getState ( ) ;
34- const siteConfig = selectors . selectCurrentSiteConfig ( state ) ;
35- return ( siteConfig ?. projects ?? [ ] ) . some (
36- ( proj ) => ! ! proj . path && ! ! selectors . selectLocalProjectConfig ( state , proj . path ) ?. thebe ,
37- ) ;
38- }
39-
4028export async function currentSiteRoutes (
4129 session : ISession ,
4230 host : string ,
@@ -212,16 +200,13 @@ export async function buildHtml(session: ISession, opts: StartOptions) {
212200 ) ;
213201 await appServer . stop ( ) ;
214202
215- // Copy files for the template used.
216-
217- // Skip thebe JS chunks unless they are required.
203+ // Copy the files for the template used.
204+ //
205+ // This always includes the thebe JS chunks, even when no project enables
206+ // `thebe`/`jupyter`. The myst-theme uses thebe-core to render Jupyter cell
207+ // outputs, so these chunks are required for outputs to render at all.
218208 const templateBuildDir = path . join ( template . templatePath , 'public' ) ;
219- const hasThebe = siteUsesThebe ( session ) ;
220- fs . copySync ( templateBuildDir , htmlDir , {
221- filter : ( src ) =>
222- hasThebe ||
223- ! path . basename ( src ) . match ( / ^ ( \d + \. ) ? ( t h e b e - ( c o r e | l i t e ) ( \. m i n ) ? \. j s | t h e b e - c o r e .* \. c s s ) $ / ) ,
224- } ) ;
209+ fs . copySync ( templateBuildDir , htmlDir ) ;
225210
226211 // Copy all of the static assets
227212 fs . copySync ( session . publicPath ( ) , path . join ( htmlDir , 'build' ) ) ;
0 commit comments