Skip to content

A Jekyll plugin to show the last_modified_at time of a post.

License

Notifications You must be signed in to change notification settings

ombulabs/jekyll-last-modified-at

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Last Modified At Plugin

A liquid tag for Jekyll to indicate the last time a file was modified.

jekyll-last-modified-at build status

Setting up

Add the following to your site's _config.yml file

gems:
  - jekyll-last-modified-at

Usage

There are a few ways to use this gem.

You can place the following tag somewhere within your layout:

{% last_modified_at %}

By default, this creates a time format matching "%d-%b-%y" (like "04-Jan-14").

You can also choose to pass along your own time format. For example:

{% last_modified_at %Y:%B:%A:%d:%S:%R %}

That produces "2014:January:Saturday:04."

You can also call the method directly on a Jekyll "object," like so:

{{ page.last_modified_at }}

To format such a time, you'll need to rely on Liquid's date filter:

{{ page.last_modified_at | date: '%Y:%B:%A:%d:%S:%R' }}

(It's generally more performant to use the page.last_modified_at version of this plugin.)

About

A Jekyll plugin to show the last_modified_at time of a post.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 99.2%
  • Shell 0.8%