Add categories to page render context
- Add post IDs to tech blog index template
This commit is contained in:
parent
aa3ee239f6
commit
019ac229fb
|
@ -193,6 +193,7 @@ let home : HttpHandler = fun next ctx -> task {
|
||||||
return!
|
return!
|
||||||
Hash.FromAnonymousObject {|
|
Hash.FromAnonymousObject {|
|
||||||
page = DisplayPage.fromPage webLog page
|
page = DisplayPage.fromPage webLog page
|
||||||
|
categories = CategoryCache.get ctx
|
||||||
page_title = page.title
|
page_title = page.title
|
||||||
is_home = true
|
is_home = true
|
||||||
|}
|
|}
|
||||||
|
|
|
@ -41,6 +41,7 @@ module CatchAll =
|
||||||
yield fun next ctx ->
|
yield fun next ctx ->
|
||||||
Hash.FromAnonymousObject {|
|
Hash.FromAnonymousObject {|
|
||||||
page = DisplayPage.fromPage webLog page
|
page = DisplayPage.fromPage webLog page
|
||||||
|
categories = CategoryCache.get ctx
|
||||||
page_title = page.title
|
page_title = page.title
|
||||||
is_page = true
|
is_page = true
|
||||||
|}
|
|}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"hostname": "data02.bitbadger.solutions",
|
"hostname": "data02.bitbadger.solutions",
|
||||||
"database": "myWebLog_dev"
|
"database": "myWebLog_dev"
|
||||||
},
|
},
|
||||||
"Generator": "myWebLog 2.0-alpha18",
|
"Generator": "myWebLog 2.0-alpha19",
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"MyWebLog.Handlers": "Debug"
|
"MyWebLog.Handlers": "Debug"
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<small class="home-lead">{{ post.published_on | date: "dddd, MMMM d, yyyy" }}</small><br>
|
<small class="home-lead">{{ post.published_on | date: "dddd, MMMM d, yyyy" }}</small><br>
|
||||||
|
|
||||||
<a href="{{ post | relative_link }}"
|
<a href="{{ post | relative_link }}"
|
||||||
|
id="{{ post.title | strip_html | downcase | replace: " ", "-" | replace: ":", "" }}"
|
||||||
title="Permanent Link to "{{ post.title | strip_html | escape }}"">
|
title="Permanent Link to "{{ post.title | strip_html | escape }}"">
|
||||||
{{ post.title }}
|
{{ post.title }}
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user