Add categories to page render context

- Add post IDs to tech blog index template
This commit is contained in:
Daniel J. Summers 2022-05-31 10:11:06 -04:00
parent aa3ee239f6
commit 019ac229fb
4 changed files with 4 additions and 1 deletions

View File

@ -193,6 +193,7 @@ let home : HttpHandler = fun next ctx -> task {
return!
Hash.FromAnonymousObject {|
page = DisplayPage.fromPage webLog page
categories = CategoryCache.get ctx
page_title = page.title
is_home = true
|}

View File

@ -41,6 +41,7 @@ module CatchAll =
yield fun next ctx ->
Hash.FromAnonymousObject {|
page = DisplayPage.fromPage webLog page
categories = CategoryCache.get ctx
page_title = page.title
is_page = true
|}

View File

@ -3,7 +3,7 @@
"hostname": "data02.bitbadger.solutions",
"database": "myWebLog_dev"
},
"Generator": "myWebLog 2.0-alpha18",
"Generator": "myWebLog 2.0-alpha19",
"Logging": {
"LogLevel": {
"MyWebLog.Handlers": "Debug"

View File

@ -11,6 +11,7 @@
<small class="home-lead">{{ post.published_on | date: "dddd, MMMM d, yyyy" }}</small><br>
&nbsp;
<a href="{{ post | relative_link }}"
id="{{ post.title | strip_html | downcase | replace: " ", "-" | replace: ":", "" }}"
title="Permanent Link to &quot;{{ post.title | strip_html | escape }}&quot;">
{{ post.title }}
</a>