Make highlight script path relative
This commit is contained in:
@ -48,7 +48,7 @@ struct PageContentGenerator {
|
||||
}
|
||||
let fullPath = pagePath + Element.htmlPagePathAddition(for: language)
|
||||
// Adjust file path to get the page url
|
||||
let url = page.relativePathToOtherSiteElement(pageUrl: fullPath)
|
||||
let url = page.relativePathToOtherSiteElement(file: fullPath)
|
||||
return html.replacingOccurrences(of: file, with: url)
|
||||
}
|
||||
|
||||
|
@ -32,9 +32,9 @@ struct PageHeadGenerator {
|
||||
}
|
||||
content[.customPageContent] = page.customHeadContent()
|
||||
if includesCode {
|
||||
let scriptPath = "/assets/js/highlight.js"
|
||||
#warning("Make highlight script path relative")
|
||||
let includeText = factory.html.scriptInclude(path: scriptPath)
|
||||
let scriptPath = "assets/js/highlight.js"
|
||||
let relative = page.relativePathToOtherSiteElement(file: scriptPath)
|
||||
let includeText = factory.html.scriptInclude(path: relative)
|
||||
if let head = content[.customPageContent] {
|
||||
content[.customPageContent] = head + "\n" + includeText
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user