Fix internal permalink regression in archives

This commit is contained in:
Sami Samhuri 2026-02-07 18:25:35 -08:00
parent 03bbd783a1
commit c69c12db99
No known key found for this signature in database
2 changed files with 18 additions and 6 deletions

View file

@ -38,16 +38,24 @@ module Pressa
ul(class: "archive") do
month_posts.sorted_posts.each do |post|
li do
a(href: post_link(post)) { post.title }
time { short_date(post.date) }
end
render_post_item(post)
end
end
end
def post_link(post)
post.link_post? ? post.link : @site.url_for(post.path)
def render_post_item(post)
if post.link_post?
li do
a(href: post.link) { "#{post.title}" }
time { short_date(post.date) }
a(class: "permalink", href: post.path) { "" }
end
else
li do
a(href: post.path) { post.title }
time { short_date(post.date) }
end
end
end
def short_date(date)

View file

@ -445,6 +445,10 @@ article header time {
font-family: "Helvetica Neue", "Verdana", sans-serif;
}
.permalink {
padding-left: 8px;
}
p.fin {
text-align: center;
color: #c4c4c4;