Skip to content

Commit

Permalink
fix(website): 🐛 fixed prism load failures
Browse files Browse the repository at this point in the history
Caused by #46.
  • Loading branch information
arctic-hen7 committed Oct 4, 2021
1 parent ca35e28 commit 43ba935
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/src/templates/docs/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ pub fn docs_page(props: DocsPageProps) -> SycamoreTemplate<G> {
current_version
})
// Because of how Perseus currently shifts everything, we need to re-highlight
// And if the user starts on a page with nothing, they'll see no highlighting on any other pages, so we rerun every time the URL changes
script(src = "/.perseus/static/prism.js", defer = true)
script {
"window.Prism.highlightAll();"
}
Expand All @@ -64,7 +66,6 @@ pub fn get_template<G: GenericNode>() -> Template<G> {
link(rel = "stylesheet", href = "/.perseus/static/styles/markdown.css")
link(rel = "stylesheet", href = "/.perseus/static/styles/docs_links_markdown.css")
link(rel = "stylesheet", href = "/.perseus/static/prism.css")
script(src = "/.perseus/static/prism.js")
}
}))
}

0 comments on commit 43ba935

Please sign in to comment.