diff --git a/TODOS.md b/TODOS.md
index 889f30a..21d6606 100644
--- a/TODOS.md
+++ b/TODOS.md
@@ -45,6 +45,7 @@
- [ ] Integrity hash
- Allows users to verify their output didn't change after upgrading to a new version
- [ ] Content-hash fingerprinting for CSS and JS cache busting
+- [ ] try to combine render_page_html and render_home_html?
- [ ] Avoid `json.Value` / `json.Object` where possible.
- [ ] Create a json schema file for `thor.json`.
- [ ] make `parse` an overload of `parse_text/parse_inline` and `parse_file`, or something.
diff --git a/bench/templates/base.html b/bench/templates/base.html
index f51cc8b..ff21c61 100644
--- a/bench/templates/base.html
+++ b/bench/templates/base.html
@@ -6,7 +6,7 @@
{{$nav}}{{/nav}}
- {{$content}}{{/content}}
+ {{$main}}{{/main}}
{{$sidebar}}{{/sidebar}}
{{$footer}}{{/footer}}
diff --git a/bench/templates/page.html b/bench/templates/page.html
index d1523b4..00c0295 100644
--- a/bench/templates/page.html
+++ b/bench/templates/page.html
@@ -12,7 +12,7 @@
{{/nav}}
-{{$content}}
+{{$main}}
Archive
{{#posts | group_by year}}
@@ -26,7 +26,7 @@
{{/posts}}
-{{/content}}
+{{/main}}
{{$sidebar}}
Recent Comments
diff --git a/defaults/layouts/base.html b/defaults/layouts/base.html
index 8b66e4e..3edaf64 100644
--- a/defaults/layouts/base.html
+++ b/defaults/layouts/base.html
@@ -10,7 +10,7 @@
- {{> nav}}{{$content}}{{/content}}
+ {{> nav}}{{$main}}{{/main}}
{{> footer}}
diff --git a/defaults/layouts/home.html b/defaults/layouts/home.html
index 03d29fc..c6c3b2f 100644
--- a/defaults/layouts/home.html
+++ b/defaults/layouts/home.html
@@ -1,8 +1,8 @@
{{
- {{&body}}
+ {{&content}}
{{#pages}} {{&title}} {{#date_iso}}
-{{/content}}
+{{/main}}
{{/base}}
diff --git a/defaults/layouts/page.html b/defaults/layouts/page.html
index de22599..75edc96 100644
--- a/defaults/layouts/page.html
+++ b/defaults/layouts/page.html
@@ -1,11 +1,11 @@
{{
{{page_title}}
{{#date_iso}} {{date_display}}
- {{/date_iso}} {{&body}}
+ {{/date_iso}} {{&content}}
-{{/content}}
+{{/main}}
{{/base}}
diff --git a/defaults/layouts/section_index.html b/defaults/layouts/section_index.html
index 397d8d8..96b6dd2 100644
--- a/defaults/layouts/section_index.html
+++ b/defaults/layouts/section_index.html
@@ -1,8 +1,8 @@
{{
{{page_title}}
- {{&body}}
+ {{&content}}
{{#posts | group_by year}}
{{key}}
@@ -15,5 +15,5 @@
{{/posts}}
-{{/content}}
+{{/main}}
{{/base}}
diff --git a/render.odin b/render.odin
index a380793..755e04e 100644
--- a/render.odin
+++ b/render.odin
@@ -21,7 +21,7 @@ Page_Context :: struct {
Base_Data :: struct {
now: string,
params: json.Value,
- body: string,
+ content: string,
title: string,
description: string,
og: Open_Graph,
@@ -279,7 +279,7 @@ render_page_html :: proc(
}
data.title = fmt.tprintf("%s | %s", page.title, site.title)
data.page_title = page.title
- data.body = page.body_html
+ data.content = page.body_html
data.date = page.date
data.og = og_for_page(site.og, page)
return render_template(content_tpl, data, partials)
@@ -305,7 +305,7 @@ render_home_html :: proc(
base = base,
}
data.title = site.title
- data.body = home.body_html
+ data.content = home.body_html
data.pages = list_pages
data.og = og_for_page(site.og, home)
return render_template(content_tpl, data, partials)
@@ -333,7 +333,7 @@ render_section :: proc(
base = base,
}
if has_index {
- data.body = section_index.body_html
+ data.content = section_index.body_html
data.page_title = section_index.title
data.title = fmt.tprintf("%s | %s", section_index.title, site.title)
data.og = og_for_page(site.og, section_index)