File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ async def example(request: Request) -> _TemplateResponse:
6666 example_path = PurePath (request .path_params ["example_name" ])
6767 resources : Resources = request .app .state .resources
6868 this_example = resources .examples [example_path ]
69+ root_path = "../../.."
6970
7071 return templates .TemplateResponse (
7172 "example.jinja2" ,
@@ -75,6 +76,7 @@ async def example(request: Request) -> _TemplateResponse:
7576 extra_head = this_example .extra_head ,
7677 body = this_example .body ,
7778 request = request ,
79+ root_path = root_path ,
7880 ),
7981 )
8082
@@ -109,8 +111,8 @@ async def content_page(request: Request) -> _TemplateResponse:
109111 Mount ("/static" , StaticFiles (directory = HERE / "static" )),
110112]
111113if PYODIDE .exists ():
112- Mount ("/pyscript" , StaticFiles (directory = PYSCRIPT )),
113- Mount ("/pyodide" , StaticFiles (directory = PYODIDE )),
114+ routes . append ( Mount ("/pyscript" , StaticFiles (directory = PYSCRIPT )))
115+ routes . append ( Mount ("/pyodide" , StaticFiles (directory = PYODIDE )))
114116
115117
116118@contextlib .asynccontextmanager # type: ignore
You can’t perform that action at this time.
0 commit comments