mirror of
https://github.com/sbrow/thor.git
synced 2026-08-26 11:23:32 -04:00
feat: Added weight field to Page.
This commit is contained in:
@@ -10,6 +10,7 @@ Frontmatter :: struct {
|
||||
date: string,
|
||||
lastmod: string,
|
||||
publishDate: string,
|
||||
weight: int,
|
||||
menus: json.Value,
|
||||
layout: string,
|
||||
og: Open_Graph,
|
||||
@@ -53,6 +54,7 @@ parse_frontmatter :: proc(content: string) -> (fm: Frontmatter, body: string, ok
|
||||
fm.date = json_get_string(obj, "date")
|
||||
fm.lastmod = json_get_string(obj, "lastmod")
|
||||
fm.publishDate = json_get_string(obj, "publishDate")
|
||||
fm.weight = json_get_int(obj, "weight")
|
||||
fm.draft = json_get_bool(obj, "draft")
|
||||
fm.isStarred = json_get_bool(obj, "isStarred")
|
||||
if v, ok := obj["menus"]; ok {
|
||||
|
||||
Reference in New Issue
Block a user