Skip to content

Commit

Permalink
Add Citation (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
jss367 authored Jun 3, 2020
1 parent c7fdee2 commit 9fbdf6e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions _data/biblio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- authors: John Smith
title: A Title About Citations
key: ref1
2 changes: 2 additions & 0 deletions _includes/citation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{%- assign citation = site.data.biblio | where:"key", include.key | first -%}
<span class="cit-authors">{{citation.authors}}</span>, <span class="cit-title">{{citation.title}}</span>
5 changes: 4 additions & 1 deletion _posts/2019-06-30-sample-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenat
Etiam luctus porttitor lorem, sed suscipit est rutrum non. Curabitur lobortis nisl a enim congue semper. Aenean commodo ultrices imperdiet. Vestibulum ut justo vel sapien venenatis tincidunt.

Phasellus eget dolor sit amet ipsum dapibus condimentum vitae quis lectus. Aliquam ut massa in turpis dapibus convallis. Praesent elit lacus, vestibulum at malesuada et, ornare et est. Ut augue nunc, sodales ut euismod non, adipiscing vitae orci. Mauris ut placerat justo. Mauris in ultricies enim. Quisque nec est eleifend nulla ultrices egestas quis ut quam. Donec sollicitudin lectus a mauris pulvinar id aliquam urna cursus. Cras quis ligula sem, vel elementum mi. Phasellus non ullamcorper urna.
Phasellus eget dolor sit amet ipsum dapibus condimentum vitae quis lectus. Aliquam ut massa in turpis dapibus convallis. Praesent elit lacus, vestibulum at malesuada et, ornare et est. Ut augue nunc, sodales ut euismod non, adipiscing vitae orci[^1]. Mauris ut placerat justo. Mauris in ultricies enim. Quisque nec est eleifend nulla ultrices egestas quis ut quam. Donec sollicitudin lectus a mauris pulvinar id aliquam urna cursus. Cras quis ligula sem, vel elementum mi. Phasellus non ullamcorper urna.

[^1]:
{% include citation.html key="ref1" %}

0 comments on commit 9fbdf6e

Please sign in to comment.