mirror of
https://github.com/sbrow/thor.git
synced 2026-08-26 11:23:32 -04:00
refactor: Replaced now object with iso string
This commit is contained in:
+5
-2
@@ -19,7 +19,7 @@ Page_Context :: struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Base_Data :: struct {
|
Base_Data :: struct {
|
||||||
now: datetime.DateTime,
|
now: string,
|
||||||
params: json.Value,
|
params: json.Value,
|
||||||
body: string,
|
body: string,
|
||||||
title: string,
|
title: string,
|
||||||
@@ -145,6 +145,7 @@ render_template :: proc(
|
|||||||
}
|
}
|
||||||
|
|
||||||
render_site :: proc(site: ^Site) {
|
render_site :: proc(site: ^Site) {
|
||||||
|
allocator := site_allocator(site)
|
||||||
pages := site.pages[:]
|
pages := site.pages[:]
|
||||||
sort_pages_by_date(pages)
|
sort_pages_by_date(pages)
|
||||||
|
|
||||||
@@ -155,7 +156,9 @@ render_site :: proc(site: ^Site) {
|
|||||||
template_cache: map[string]mustache.Template
|
template_cache: map[string]mustache.Template
|
||||||
defer delete(template_cache)
|
defer delete(template_cache)
|
||||||
|
|
||||||
now, ok := time.time_to_datetime(time.now())
|
// TODO: CAlculate offset
|
||||||
|
offset := 0
|
||||||
|
now, ok := time.time_to_rfc3339(time.now(), offset, false, allocator)
|
||||||
assert(ok)
|
assert(ok)
|
||||||
|
|
||||||
// Build base data once
|
// Build base data once
|
||||||
|
|||||||
Reference in New Issue
Block a user