diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-25 20:31:01 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-25 20:31:01 +0100 |
commit | e7596b1b3cb58ad774aa8b7fad66d5f2298baa1a (patch) | |
tree | 4277c5abe8e4b72159a6cc07bf58581e9572cf92 /_plugins | |
parent | 596cdbdf682ef467bd99cb87dbeeb5ac98153d19 (diff) |
add stale indicator + admonition css
Diffstat (limited to '_plugins')
-rw-r--r-- | _plugins/filters.rb | 4 | ||||
-rw-r--r-- | _plugins/meta.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/_plugins/filters.rb b/_plugins/filters.rb index c4ee527..78eb04f 100644 --- a/_plugins/filters.rb +++ b/_plugins/filters.rb @@ -15,9 +15,9 @@ module Filters def post_sort(posts, sort_by) # date (reverse chronological) - return posts.sort_by{ |post| -post.date.to_i } if sort_by == "date" + return posts.sort_by{ |post| -post.data['date'].to_i } if sort_by == "date" # title (case insensitive) - return posts.sort_by{ |post| post.title.downcase } if sort_by == "title" + return posts.sort_by{ |post| post.data['title'].downcase } if sort_by == "title" end end diff --git a/_plugins/meta.rb b/_plugins/meta.rb index 28afd13..0e25871 100644 --- a/_plugins/meta.rb +++ b/_plugins/meta.rb @@ -6,7 +6,7 @@ class Meta < Jekyll::Generator posts = site.collections['items'] for page in posts do # convert generated page metadata and add directly to `page.meta` in liquid - page.data['meta'] = transform_data(site, page.slug) + page.data['meta'] = transform_data(site, page.data['slug']) # set page.authors to author metadata from git+yaml page.data['authors'] = site.data['authors'].filter do |author| @@ -53,7 +53,7 @@ class Meta < Jekyll::Generator # tally tags for post in posts do - for tag in post.tags do + for tag in post.data['tags'] do tags[tag] = tags.fetch(tag, 0) + 1 end end |