Skip to content

Commit

Permalink
assign and use Liquid variables in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmaroli committed Mar 14, 2018
1 parent 86d8625 commit b91ecf3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/_includes/news_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ <h2>
<span class="post-date">
{{ post.date | date_to_string }}
</span>
<a href="https://github.com/{{ post.author }}" class="post-author">
{% assign author = post.author %}
{% assign author = post.author %}
<a href="https://github.com/{{ author }}" class="post-author">
{% avatar user=author size=24 %}
{{ post.author }}
{{ author }}
</a>
</div>
<div class="post-content">
Expand Down
7 changes: 4 additions & 3 deletions docs/_layouts/news_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ <h2>
<span class="post-date">
{{ page.date | date_to_string }}
</span>
<a href="https://github.com/{{ page.author }}" class="post-author">
{% avatar {{ page.author}} size=24 %}
{{ page.author }}
{% assign author = page.author %}
<a href="https://github.com/{{ author }}" class="post-author">
{% avatar user=author size=24 %}
{{ author }}
</a>
</div>
<div class="post-content">
Expand Down

0 comments on commit b91ecf3

Please sign in to comment.