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", "~> 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-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 "webrick", "~> 1.7"
gem "nokogiri" gem "nokogiri"

View File

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

View File

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

View File

@ -6,7 +6,7 @@ layout: default
<div> <div>
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
<time datetime="{{ page.last_modified_at | date_to_xmlschema }}">{% if page.type != 'pages' %} <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 %} {% endif %}
</time> </time>
</div> </div>