Add highlight js
This commit is contained in:
parent
7f4a65ca75
commit
6ef76ea48d
1 changed files with 6 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue