Skip to content

Commit

Permalink
added page last modified
Browse files Browse the repository at this point in the history
  • Loading branch information
benbrignell committed Nov 23, 2017
1 parent c9577bf commit 6d9a37a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source "https://rubygems.org"

gem 'github-pages'
gem 'github-pages'
gem 'jekyll-last-modified-at'
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ GEM
jekyll-github-metadata (2.3.1)
jekyll (~> 3.1)
octokit (~> 4.0, != 4.4.0)
jekyll-last-modified-at (1.0.1)
jekyll (~> 3.3)
posix-spawn (~> 0.3.9)
jekyll-mentions (1.2.0)
activesupport (~> 4.0)
html-pipeline (~> 2.3)
Expand Down Expand Up @@ -170,6 +173,7 @@ GEM
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
posix-spawn (0.3.11)
public_suffix (2.0.5)
rb-fsevent (0.9.8)
rb-inotify (0.9.10)
Expand All @@ -194,6 +198,7 @@ PLATFORMS

DEPENDENCIES
github-pages
jekyll-last-modified-at

BUNDLED WITH
1.15.1
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ sass:
collections:
examples:
output: true
gems:
- jekyll-last-modified-at
7 changes: 7 additions & 0 deletions _layouts/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<header class="example-header">
<h1>{{page.title}}</h1>
<p style="max-width: 40em; ">{{page.overview}}</p>

</header>

<article>
Expand All @@ -25,6 +26,12 @@ <h2>{{ principle.principle }}</h2>
<aside>


<p class="source">
Last modified:
</p>
<p>
{{ page.last_modified_at | date: '%d %B %Y' }}
</p>
{% if page.author %}
<p class="source">
Author:
Expand Down
1 change: 1 addition & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ <h2 class="intro">Who use them?</h2>
</div>
<h2><a href="{{example.url}}">{{example.title}}</a></h2>
<p>{{example.author}}</p>
<p>{{ page.last_modified_at | date: '%d %B %Y' }}</p>
<!-- <ol class="cards">
{% for principles in example.principles %}
<li><a href="{{example.url}}/#{{principles.principle | slugify}}">{{principles.principle}}</a></li>
Expand Down

0 comments on commit 6d9a37a

Please sign in to comment.