Skip to content

Commit 49541c1

Browse files
fix: update asset paths and navigation in 404 page
Modified asset links in the 404 page to use absolute paths for consistency and improved navigation. Updated the "Back to Sajilo" link to redirect to the homepage instead of the index page. Enhanced the wrangler configuration to ensure proper handling of specific routes before serving assets, improving error handling for unmatched paths.
1 parent 29365b6 commit 49541c1

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

apps/landing/404.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<title>Page not found: Sajilo</title>
77
<meta name="robots" content="noindex">
88

9-
<link rel="icon" href="assets/favicon.png" type="image/png">
10-
<link rel="apple-touch-icon" href="assets/apple-touch-icon.png">
9+
<link rel="icon" href="/assets/favicon.png" type="image/png">
10+
<link rel="apple-touch-icon" href="/assets/apple-touch-icon.png">
1111

1212
<link rel="preconnect" href="https://fonts.googleapis.com">
1313
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1414
<link href="https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&family=Public+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
1515

16-
<link rel="stylesheet" href="style.css">
16+
<link rel="stylesheet" href="/style.css">
1717
<style>
1818
.not-found {
1919
min-height: 60vh;
@@ -52,7 +52,7 @@
5252
<header class="wrap">
5353
<nav class="nav">
5454
<div class="brand">
55-
<img src="assets/icon.png" alt="">
55+
<img src="/assets/icon.png" alt="">
5656
Sajilo
5757
</div>
5858
<a class="github" href="https://github.com/adarshaacharya/sajilo" target="_blank" rel="noopener">
@@ -67,7 +67,7 @@
6767
<p class="glyph">404</p>
6868
<h1>This page doesn't exist.</h1>
6969
<p>The link may be old, or mistyped. The calendar, downloads, and install guide are all back home.</p>
70-
<a class="btn-primary" href="index.html">Back to Sajilo</a>
70+
<a class="btn-primary" href="/">Back to Sajilo</a>
7171
</div>
7272
</main>
7373

apps/landing/wrangler.jsonc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
"assets": {
66
"directory": ".",
77
"binding": "ASSETS",
8-
"not_found_handling": "404-page"
8+
"not_found_handling": "404-page",
9+
// Assets are served before the Worker runs, so `/dl/…` — which matches no
10+
// file — was answered with 404.html and the redirect never happened. These
11+
// routes have to reach the Worker first; every other path keeps the
12+
// assets-first behaviour.
13+
"run_worker_first": ["/dl/*"]
914
},
1015
"d1_databases": [
1116
{

0 commit comments

Comments
 (0)