add timeago

main
Jay Hankins 2022-08-28 15:40:46 -04:00
parent 2046a8229c
commit aae82fa0a8
4 changed files with 7 additions and 1 deletions

View File

@ -6,5 +6,6 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "jekyll", "~> 4.0"
gem "jekyll-last-modified-at", git: "https://github.com/maximevaillancourt/jekyll-last-modified-at", branch: "add-support-for-files-in-git-submodules"
gem 'jekyll-timeago'
gem "webrick", "~> 1.7"
gem "nokogiri"

View File

@ -40,6 +40,8 @@ GEM
terminal-table (~> 2.0)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-timeago (0.14.0)
mini_i18n (>= 0.8.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.1)
@ -51,6 +53,7 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
mini_i18n (0.8.0)
mini_portile2 (2.8.0)
nokogiri (1.13.6)
mini_portile2 (~> 2.8.0)
@ -79,6 +82,7 @@ PLATFORMS
DEPENDENCIES
jekyll (~> 4.0)
jekyll-last-modified-at!
jekyll-timeago
nokogiri
webrick (~> 1.7)

View File

@ -24,6 +24,7 @@ relative_permalinks: false
plugins:
- jekyll-last-modified-at
- jekyll-timeago
sass:
sass_dir: _sass

View File

@ -6,7 +6,7 @@ layout: default
<div>
<h1>{{ page.title }}</h1>
<time datetime="{{ page.last_modified_at | date_to_xmlschema }}">{% if page.type != 'pages' %}
Last updated on {{ page.last_modified_at | date: "%B %-d, %Y" }}
Last updated {{ page.last_modified_at | timeago }}
{% endif %}
</time>
</div>