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:
66
66
example_path = PurePath (request .path_params ["example_name" ])
67
67
resources : Resources = request .app .state .resources
68
68
this_example = resources .examples [example_path ]
69
+ root_path = "../../.."
69
70
70
71
return templates .TemplateResponse (
71
72
"example.jinja2" ,
@@ -75,6 +76,7 @@ async def example(request: Request) -> _TemplateResponse:
75
76
extra_head = this_example .extra_head ,
76
77
body = this_example .body ,
77
78
request = request ,
79
+ root_path = root_path ,
78
80
),
79
81
)
80
82
@@ -109,8 +111,8 @@ async def content_page(request: Request) -> _TemplateResponse:
109
111
Mount ("/static" , StaticFiles (directory = HERE / "static" )),
110
112
]
111
113
if 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 )))
114
116
115
117
116
118
@contextlib .asynccontextmanager # type: ignore
You can’t perform that action at this time.
0 commit comments