reverse order for index
This commit is contained in:
@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user