Fix bugs and errors

This commit is contained in:
Talia 2024-04-05 17:51:11 +02:00
parent 2336656ab8
commit 55a497fe02
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E
3 changed files with 3 additions and 3 deletions

View file

@ -49,7 +49,7 @@ for file in restia.utils.files(params.input, "^./posts/.*%.md$") do
post.head.tags = string.split(post.head.tags, "[%a-]+")
end
for key, tag in ipairs(post.head.tags) do
for key, tag in ipairs(post.head.tags or {}) do
post.head.tags[key] = string.lower(tag)
end

View file

@ -23,7 +23,7 @@ slots.head
slots.head script type: 'module', src: "/javascript/LocalDate.js"
slots.head script type: 'module', src: "/javascript/BlogPost.js"
return div
return main
class: "content-width"
* h1 "Blog Posts"
* [blogPost post p for p in *posts]

View file

@ -29,7 +29,7 @@ positions = (input, character) ->
breadcrumb = (href) -> li a :href, href\match('[^/]+$'), tabindex: 0
if src = post.head.cover_image
if src := post.head.cover_image
slots.top pageHero cover: 60
* img :src, style: 'opacity: .4'
* h1(post.head.title, style: "view-transition-name: #{post.head.slug}")