Skip to content

Commit

Permalink
fixing highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarstonConnell committed Aug 1, 2024
1 parent 5fb7dd2 commit 098b87e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
13 changes: 4 additions & 9 deletions gen/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ func CreateHead(base string, titleText string, color Colors) *html.Node {
})

icons := createHTMLElement("link", map[string]string{"rel": "stylesheet", "href": "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css", "defer": ""})
highlightcss := createHTMLElement("link", map[string]string{"rel": "stylesheet", "href": "default.min.css", "defer": ""})
highlightjs := createHTMLElement("script", map[string]string{"src": "highlight.min.js", "defer": ""})
highlightjsGo := createHTMLElement("script", map[string]string{"src": "go.min.js", "defer": ""})
highlightcss := createHTMLElement("link", map[string]string{"rel": "stylesheet", "href": "/default.min.css"})
highlightjs := createHTMLElement("script", map[string]string{"src": "/highlight.min.js"})
highlightjsGo := createHTMLElement("script", map[string]string{"src": "/go.min.js"})

favicon := createHTMLElement("link", map[string]string{"rel": "icon", "type": "image/png", "href": "icon.png"})
favicon := createHTMLElement("link", map[string]string{"rel": "icon", "type": "image/png", "href": "/icon.png"})

b := createHTMLElement("base", map[string]string{"href": base})

Expand Down Expand Up @@ -189,11 +189,6 @@ func CreateIndex(summaryData []byte, pageData []byte, marker string, base string
main := createHTMLElement("div", id("main"), headerBar, nav, page)

body.AppendChild(main)
highlightInit := createHTMLElement("script", nil, &html.Node{
Type: html.TextNode,
Data: "hljs.highlightAll();",
})
body.AppendChild(highlightInit)

docsJs := createHTMLElement("script", nil, &html.Node{
Type: html.TextNode,
Expand Down
1 change: 1 addition & 0 deletions gen/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ window.addEventListener("load", start)

function start () {
console.log("hello world!")
hljs.highlightAll();

const menuButton = document.getElementById("menu")
const nav = document.getElementById("navbar")
Expand Down

0 comments on commit 098b87e

Please sign in to comment.