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:
parent
a886574696
commit
e48ea4f97f
13
public/index.html
Normal file
13
public/index.html
Normal 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>
|
||||
@ -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
Loading…
x
Reference in New Issue
Block a user