Add highlight js

This commit is contained in:
Florian RICHER 2023-11-26 18:57:58 +01:00
parent 7f4a65ca75
commit 6ef76ea48d

View file

@ -16,7 +16,12 @@ pub fn App() -> impl IntoView {
<Router>
<Routes>
<Route path="" view=pages::Home />
<Route path="posts" view=|| view!{ <pages::PostList folder="posts".to_string() /> } />
<Route path="posts" view=|| view! {
<Link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<pages::PostList folder="posts".to_string() />
} />
<Route path="/*any" view=|| view! { <h1>"Not Found"</h1> }/>
</Routes>
</Router>