Skip to content

Commit

Permalink
pob: fix header being inserted into the body
Browse files Browse the repository at this point in the history
  • Loading branch information
Dav1dde committed Feb 14, 2024
1 parent 1f20df7 commit 7978924
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
<link data-trunk rel="inline" href="dist/.stage/styles.css" />
<link data-trunk rel="copy-dir" href="assets/"/>
<link data-trunk rel="copy-file" href="robots.txt">

%head%
</head>
<body class="antialiased text-slate-600 dark:text-slate-300 bg-slate-100 dark:bg-slate-800">
<div id="app">
Expand Down
2 changes: 1 addition & 1 deletion worker/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async fn render(info: ResponseInfo, ctx: app::Context) -> Response {

// Not sure if I like that, this requries trunk to run before building the worker.
let index = include_str!("../../app/dist/index.html")
.replace("%head%", &head)
.replace("</head>", &format!("{head}</head>"))
.replace("%app%", &app);

let etag = info.etag.as_deref().map(|etag| Etag::weak(etag).git());
Expand Down

0 comments on commit 7978924

Please sign in to comment.