Compare commits
2
Commits
18a1d2ae0b
...
200d3d376a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
200d3d376a | ||
|
|
c0b195ffd0 |
+11
@@ -16,11 +16,22 @@ HIGHLIGHT_JS_PREFIX :: "<script type=\"text/javascript\" src=\"https://unpkg.com
|
||||
|
||||
|
||||
write_prefixs_to_html_file :: proc(file: ^os.File) {
|
||||
file_info, err := os.fstat(file, context.temp_allocator)
|
||||
if err != nil {
|
||||
fmt.eprintfln("ERROR in write_prefixs_to_html_file: Could not open file %s: %s", file, os.error_string(err))
|
||||
}
|
||||
defer free_all(context.temp_allocator) //clean up file_info
|
||||
|
||||
os.write_string(file, UTF8_PREFIX)
|
||||
os.write_string(file, CSS_PREFIX)
|
||||
os.write_string(file, FAVICON_PREFIX)
|
||||
os.write_string(file, MASTODON_PREFIX)
|
||||
|
||||
// sck: ONLY apply hljs to blogs/articles. These files will always
|
||||
// start with a "2" (2026-xx-xx...)
|
||||
if strings.starts_with(file_info.name, "2") {
|
||||
os.write_string(file, HIGHLIGHT_JS_PREFIX)
|
||||
}
|
||||
}
|
||||
|
||||
walk_tree_and_get_md_names :: proc(path: string, allocator := context.allocator) -> [dynamic]string {
|
||||
|
||||
Reference in New Issue
Block a user