Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Add option to set page.date automatically with the file creation date #1

Closed
wants to merge 8 commits into from

Conversation

numist
Copy link
Owner

@numist numist commented Nov 9, 2022

Adds support for a "first posted at" variable, placed in page.date, as submitted to gjtorikian/jekyll-last-modified-at by @buddhist-uni

end

it 'has date' do
setup('no-date.md', 'date_with_format.html')
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently struggling with:

  1) Date Tag A committed post file has date
     Failure/Error: post.output = Renderer.new(@site, post, @site.site_payload).run
     
     Liquid::SyntaxError:
       Liquid syntax error (line 6): Unknown tag 'page'

Removing page. from spec/fixtures/_layouts/date_with_format.html (so it's just date) doesn't change anything. I'm probably missing something obvious but it's tired and I'm late.

@numist
Copy link
Owner Author

numist commented Nov 9, 2022

On further review, I think that forking the plugin and nearly rewriting it is probably a bad plan; I don't have the bandwidth to support a plugin so I'm going to just write something checked into my blog's repo 😬

For anyone spelunking, one thing I was trying to accomplish was support for posts without dates in their filenames. Jekyll won't do this, at the moment my best thought is a generator component in the plugin that enumerates _posts for rejected files and adds them to the site's posts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants