fixed formatting

This commit is contained in:
Simon Kellet 2026-07-06 20:47:45 +01:00
parent 178815cefe
commit 10d383e4c2
3 changed files with 6 additions and 12 deletions

View File

@ -45,9 +45,9 @@ generate_blog_md_file :: proc(path: string, allocator := context.allocator) {
for blog in blogs {
b := strings.split(blog, blog_dir, allocator)
trim_b := strings.trim_right(b[1], ".md")
if trim_b == "index" { continue } //Ignore Index
if trim_b == "index" {continue} //Ignore Index
if strings.starts_with(trim_b, "!") { continue } //Ignore WIP files!
if strings.starts_with(trim_b, "!") {continue} //Ignore WIP files!
append(&blog_list, blog)
}

View File

@ -72,14 +72,8 @@ main :: proc() {
end := time.tick_since(start)
os.write_string(file, "<br><footer><hr />This site was generated με αγάπη on ")
os.write_string(
file,
fmt.aprintf("%s ", time.to_string_dd_mm_yy(date, buf[:]), allocator = arena_alloc),
)
os.write_string(
file,
fmt.aprintf("in %v ", time.duration_round(end, time.Nanosecond), allocator = arena_alloc),
)
os.write_string(file, fmt.aprintf("%s ", time.to_string_dd_mm_yy(date, buf[:]), allocator = arena_alloc))
os.write_string(file, fmt.aprintf("in %v ", time.duration_round(end, time.Nanosecond), allocator = arena_alloc))
os.write_string(file, "<font color=#ea76cb><3</font> </footer><br>")
}
}

View File

@ -39,7 +39,7 @@ walk_tree_and_get_md_names :: proc(path: string, allocator := context.allocator)
}
// Skip files that are NOT .md files
if !strings.has_suffix(info.name, MD_SUFFIX) { continue }
if !strings.has_suffix(info.name, MD_SUFFIX) {continue}
append(&files, strings.clone(info.fullpath, allocator))
}
@ -74,7 +74,7 @@ walk_tree :: proc(path: string) -> []u8 {
return nil
}
parse_file_md_to_html :: proc(filename: string, allocator := context.allocator) -> (parsed: string, err: os.Error) {
parse_file_md_to_html :: proc(filename: string, allocator := context.allocator, ) -> (parsed: string, err: os.Error) {
str := os.read_entire_file_from_path(filename, allocator) or_return
root := cm.parse_document_from_string(string(str), cm.DEFAULT_OPTIONS)
//root := cm.parse_document(raw_data(str), len(str), cm.DEFAULT_OPTIONS)