fix: add CSS stylesheets via document API for SSR

- Add document::Stylesheet for /style.css and /highlight.css in AppRouter
- This ensures CSS is included in SSR HTML for all pages (home, post detail, etc.)
- Also add public/index.html for production builds
- Remove stale ISRG cache files
This commit is contained in:
xfy 2026-06-03 15:37:17 +08:00
parent a886574696
commit e48ea4f97f
4 changed files with 16 additions and 429 deletions

13
public/index.html Normal file
View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/highlight.css">
<title>Yggdrasil Blog</title>
</head>
<body>
<div id="main"></div>
</body>
</html>

View File

@ -64,6 +64,9 @@ pub fn AppRouter() -> Element {
use_context_provider(|| UserContext { user, checked });
rsx! {
document::Stylesheet { href: "/style.css" }
document::Stylesheet { href: "/highlight.css" }
document::Title { "Yggdrasil Blog" }
div {
class: "{theme_class}",
ThemePreload {}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long