mirror of
https://github.com/sbrow/thor.git
synced 2026-08-26 11:23:32 -04:00
fix: Removed need for has_date in templates.
This commit is contained in:
@@ -3,20 +3,10 @@
|
|||||||
- [ ] Content-hash fingerprinting for CSS and JS cache busting
|
- [ ] Content-hash fingerprinting for CSS and JS cache busting
|
||||||
- [ ] Performance
|
- [ ] Performance
|
||||||
- [ ] See if we can disable bounds checks in `write_indented` and elsewhere.
|
- [ ] See if we can disable bounds checks in `write_indented` and elsewhere.
|
||||||
- [ ] remove "has_*" keys from context.
|
|
||||||
- [x] Enable configuration to opt-out of features, particular pre/post processors.
|
|
||||||
- [ ] proper date/time/now object.
|
|
||||||
- [ ] Footer isn't centered properly.
|
|
||||||
- [ ] mustache data keys for opengraph, etc.
|
- [ ] mustache data keys for opengraph, etc.
|
||||||
- [ ] Block attributes on code fences (`{ #ex-1 }`) — hello-world.md
|
- [ ] Block attributes on code fences (`{ #ex-1 }`) — hello-world.md
|
||||||
- [x] Emoji shortcodes (`:shrug:` etc.) — 2 instances
|
|
||||||
- [x] Backslash in shrug not visible.
|
|
||||||
- [ ] include-code shortcode (`{{< include-code ... >}}`) — i-ported-fd-to-odin
|
- [ ] include-code shortcode (`{{< include-code ... >}}`) — i-ported-fd-to-odin
|
||||||
- [x] Nix build integration — main flake runs thor + tailwindcss instead of Hugo
|
|
||||||
- [x] OpenGraph meta tags
|
|
||||||
- [x] copy all files from `static` to `public`.
|
|
||||||
- [ ] ensure sidenote numbers render in display order and not in declaration order.
|
- [ ] ensure sidenote numbers render in display order and not in declaration order.
|
||||||
- [x] Search up for `thor.json` files.
|
|
||||||
- [ ] OpenGraph meta tags — verify all fields match production site
|
- [ ] OpenGraph meta tags — verify all fields match production site
|
||||||
- [ ] Add Opt-in deflist support.
|
- [ ] Add Opt-in deflist support.
|
||||||
- [ ] set opengraph tags / description automatically if unset. (Like hugo does)
|
- [ ] set opengraph tags / description automatically if unset. (Like hugo does)
|
||||||
@@ -40,6 +30,8 @@
|
|||||||
- [ ] event based
|
- [ ] event based
|
||||||
- [ ] Free cmark HTML output (`body_html`) — cmark allocates via C malloc, not the arena, so it leaks per iteration in watch mode
|
- [ ] Free cmark HTML output (`body_html`) — cmark allocates via C malloc, not the arena, so it leaks per iteration in watch mode
|
||||||
- [ ] commands
|
- [ ] commands
|
||||||
|
- [ ] `build` alias of default
|
||||||
|
- [ ] `init` set up new project
|
||||||
- [ ] Use spall to find ways to reduce run time.
|
- [ ] Use spall to find ways to reduce run time.
|
||||||
- [ ] warn/error when unknown key used in mustache.
|
- [ ] warn/error when unknown key used in mustache.
|
||||||
- [ ] Review every file in thor
|
- [ ] Review every file in thor
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ Page_Context :: struct {
|
|||||||
permalink: string,
|
permalink: string,
|
||||||
title: string,
|
title: string,
|
||||||
starred: bool,
|
starred: bool,
|
||||||
has_date: bool,
|
|
||||||
date_iso: string,
|
date_iso: string,
|
||||||
date_display: string,
|
date_display: string,
|
||||||
}
|
}
|
||||||
@@ -43,7 +42,6 @@ Base_Data :: struct {
|
|||||||
Page_Data :: struct {
|
Page_Data :: struct {
|
||||||
using base: Base_Data,
|
using base: Base_Data,
|
||||||
page_title: string,
|
page_title: string,
|
||||||
has_date: bool,
|
|
||||||
date_iso: string,
|
date_iso: string,
|
||||||
date_display: string,
|
date_display: string,
|
||||||
is_post: bool,
|
is_post: bool,
|
||||||
@@ -66,7 +64,6 @@ build_page_context :: proc(page: Page) -> Page_Context {
|
|||||||
permalink = page.permalink,
|
permalink = page.permalink,
|
||||||
title = page.title,
|
title = page.title,
|
||||||
starred = page.is_starred,
|
starred = page.is_starred,
|
||||||
has_date = page.date != "",
|
|
||||||
date_iso = page.date,
|
date_iso = page.date,
|
||||||
date_display = format_date(page.date),
|
date_display = format_date(page.date),
|
||||||
}
|
}
|
||||||
@@ -227,7 +224,6 @@ render_page_html :: proc(
|
|||||||
data.title = fmt.tprintf("%s | %s", page.title, config.title)
|
data.title = fmt.tprintf("%s | %s", page.title, config.title)
|
||||||
data.page_title = page.title
|
data.page_title = page.title
|
||||||
data.body = page.body_html
|
data.body = page.body_html
|
||||||
data.has_date = page.date != ""
|
|
||||||
data.date_iso = page.date
|
data.date_iso = page.date
|
||||||
data.date_display = format_date(page.date)
|
data.date_display = format_date(page.date)
|
||||||
data.is_post = is_article
|
data.is_post = is_article
|
||||||
|
|||||||
Reference in New Issue
Block a user