@@ -291,29 +291,29 @@ def get_theme_dir(username,repo,commit,type):
291
291
# commit=commit,
292
292
# frontend_data=frontend_data)
293
293
294
- @app .route ('/myst/<username>/<repo>/<commit>/' )
295
- @app .route ('/myst/<username>/<repo>/<commit>/<path:page_path>' )
296
- def render_page (username , repo , commit , page_path = '' ):
297
- user_build_dir = get_user_build_dir (username , repo , commit )
298
- if not page_path :
299
- # If no specific page is requested, serve index.html
300
- index_path = os .path .join (user_build_dir , 'index.html' )
301
- if os .path .exists (index_path ):
302
- return send_file (index_path )
303
- else :
304
- return abort (404 , description = "Index file not found" )
305
-
306
- page_path = os .path .join (user_build_dir , page_path )
307
- if os .path .exists (page_path ):
308
- return send_file (page_path )
309
- else :
310
- return abort (404 , description = "Page not found" )
311
-
312
- @app .route ('/myst/<username>/<repo>/<commit>/public/<path:filename>' )
313
- def serve_public (username , repo , commit , filename ):
314
- user_build_dir = get_user_build_dir (username , repo , commit )
315
- return send_from_directory (os .path .join (user_build_dir , 'public' ), filename )
294
+ # @app.route('/myst/<username>/<repo>/<commit>/')
295
+ # @app.route('/myst/<username>/<repo>/<commit>/<path:page_path>')
296
+ # def render_page(username, repo, commit, page_path=''):
297
+ # user_build_dir = get_user_build_dir(username, repo, commit)
298
+ # if not page_path:
299
+ # # If no specific page is requested, serve index.html
300
+ # index_path = os.path.join(user_build_dir, 'index.html')
301
+ # if os.path.exists(index_path):
302
+ # return send_file(index_path)
303
+ # else:
304
+ # return abort(404, description="Index file not found")
305
+
306
+ # page_path = os.path.join(user_build_dir, page_path)
307
+ # if os.path.exists(page_path):
308
+ # return send_file(page_path)
309
+ # else:
310
+ # return abort(404, description="Page not found")
311
+
312
+ # @app.route('/myst/<username>/<repo>/<commit>/public/<path:filename>')
313
+ # def serve_public(username, repo, commit, filename):
314
+ # user_build_dir = get_user_build_dir(username, repo, commit)
315
+ # return send_from_directory(os.path.join(user_build_dir, 'public'), filename)
316
316
317
- @app .route ('/theme/<path:filename>' )
318
- def serve_theme (filename ,username ,repo ,commit ):
319
- return send_from_directory (os .path .join (get_theme_dir (username ,repo ,commit ,'article-theme' ), 'build' ), filename )
317
+ # @app.route('/theme/<path:filename>')
318
+ # def serve_theme(filename,username,repo,commit):
319
+ # return send_from_directory(os.path.join(get_theme_dir(username,repo,commit,'article-theme'), 'build'), filename)
0 commit comments