Skip to content

Commit

Permalink
Added postinfo template and sample post that displays it.
Browse files Browse the repository at this point in the history
Added author setting to site.yaml.
  • Loading branch information
yaph committed Jan 25, 2015
1 parent ee69905 commit 244fa8e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
18 changes: 18 additions & 0 deletions logya/sites/starter/content/sample-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
url: /sample-post/
title: Sample Post
created: 2015-01-25T17:45:30
template: post.html
noindex: 1
---
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
1 change: 1 addition & 0 deletions logya/sites/starter/site.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
site:
base_url: http://localhost:8080
disqus_shortname: null
author: Author

indexes:
- path: tags
Expand Down
1 change: 1 addition & 0 deletions logya/sites/starter/templates/disqus.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% if disqus_shortname %}
<hr>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ disqus_shortname }}';
Expand Down
2 changes: 2 additions & 0 deletions logya/sites/starter/templates/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
<div class="col-md-12">
<h1>{{ title }}</h1>
<div>{{ body }}</div>
<hr>
</div>
</div>

<div class="row">
<div class="col-md-12">
{% include 'postinfo.html' %}
{% include 'disqus.html' %}
</div>
</div>
Expand Down
9 changes: 9 additions & 0 deletions logya/sites/starter/templates/postinfo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% if author %}
<p>Written by {{ author }}.</p>
{% endif %}
<p>
<i class="fa fa-calendar"></i> <time datetime="{{ created.strftime('%Y-%m-%dT%H:%M') }}">{{ created.strftime('%B %d, %Y') }}</time>
{% if updated and updated.strftime('%Y%m%d') != created.strftime('%Y%m%d') %}
(updated: <time datetime="{{ updated.strftime('%Y-%m-%dT%H:%M') }}">{{ updated.strftime('%B %d, %Y') }}</time>)
{% endif %}
</p>

0 comments on commit 244fa8e

Please sign in to comment.