Skip to content

Commit bfe4ee4

Browse files
committed
Fit the frontend import path
1 parent e238047 commit bfe4ee4

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

site/src/resources.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct StaticCompiledAssets;
2323

2424
/// HTML template files that will be rendered by `tera`.
2525
#[derive(RustEmbed)]
26-
#[folder = "frontend/templates/"]
26+
#[folder = "frontend/dist"]
2727
#[include = "*.html"]
2828
struct TemplateAssets;
2929

site/src/server.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -616,15 +616,12 @@ async fn handle_fs_path(
616616
}
617617

618618
async fn resolve_template(path: &str) -> Vec<u8> {
619-
TEMPLATES
620-
.get_template(&format!("pages/{}", path))
621-
.await
622-
.unwrap()
619+
TEMPLATES.get_template(&path).await.unwrap()
623620
}
624621

625622
let relative_path = path.trim_start_matches('/');
626623
let source = match path {
627-
"" | "/" | "/index.html" => resolve_template("graphs.html").await,
624+
"" | "/" | "/index.html" | "/graphs.html" => resolve_template("graphs.html").await,
628625
"/bootstrap.html"
629626
| "/compare.html"
630627
| "/dashboard.html"

0 commit comments

Comments
 (0)