Compare commits

..
2 Commits
Author SHA1 Message Date
Simon Kellet 200d3d376a added cond. to add hljs to blogs only 2026-08-23 13:41:01 +01:00
Simon Kellet c0b195ffd0 update png 2026-08-23 13:36:34 +01:00
2 changed files with 12 additions and 1 deletions
+12 -1
View File
@@ -16,11 +16,22 @@ HIGHLIGHT_JS_PREFIX :: "<script type=\"text/javascript\" src=\"https://unpkg.com
write_prefixs_to_html_file :: proc(file: ^os.File) { 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, UTF8_PREFIX)
os.write_string(file, CSS_PREFIX) os.write_string(file, CSS_PREFIX)
os.write_string(file, FAVICON_PREFIX) os.write_string(file, FAVICON_PREFIX)
os.write_string(file, MASTODON_PREFIX) os.write_string(file, MASTODON_PREFIX)
os.write_string(file, HIGHLIGHT_JS_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 { walk_tree_and_get_md_names :: proc(path: string, allocator := context.allocator) -> [dynamic]string {
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 KiB

After

Width:  |  Height:  |  Size: 255 KiB