reverse order for index

This commit is contained in:
Simon Kellet
2026-08-21 16:34:40 +01:00
parent 81871b7d89
commit 28bb1838f5
+2 -1
View File
@@ -42,6 +42,7 @@ generate_blog_md_file :: proc(path: string, allocator := context.allocator) {
//os.write_string(file, BLOG_START) //os.write_string(file, BLOG_START)
blogs := walk_tree_and_get_md_names(blog_dir, allocator) blogs := walk_tree_and_get_md_names(blog_dir, allocator)
// *********** BLOG PARSING **************
for blog in blogs { for blog in blogs {
b := strings.split(blog, blog_dir, allocator) b := strings.split(blog, blog_dir, allocator)
trim_b := strings.trim_right(b[1], ".md") trim_b := strings.trim_right(b[1], ".md")
@@ -51,7 +52,7 @@ generate_blog_md_file :: proc(path: string, allocator := context.allocator) {
append(&blog_list, blog) append(&blog_list, blog)
} }
for blog_entry in blog_list { #reverse for blog_entry in blog_list {
b := strings.split(blog_entry, blog_dir, allocator) b := strings.split(blog_entry, blog_dir, allocator)
trim_b := strings.trim_right(b[1], ".md") trim_b := strings.trim_right(b[1], ".md")
strings.write_string(&blog_md_file, fmt.aprintf("* [%s](./%s.html)", trim_b, trim_b, allocator = allocator)) strings.write_string(&blog_md_file, fmt.aprintf("* [%s](./%s.html)", trim_b, trim_b, allocator = allocator))