Allow dynamic images on each blog post (#143)

* Allow dynamic images on each blog post

* Adding responsive CSS for blog post images

* Adding image parameter to YAML front matter
This commit is contained in:
Bryan Britten
2016-12-24 17:48:55 -05:00
committed by Dean Attali
parent 33c5ffadff
commit 66bd2ada99
7 changed files with 67 additions and 6 deletions

View File

@ -21,12 +21,21 @@ subtitle: This is where I will tell my friends way too much about me
Posted on {{ post.date | date: "%B %-d, %Y" }}
</p>
<div class="post-entry">
{{ post.excerpt | strip_html | xml_escape | truncatewords: site.excerpt_length }}
{% assign excerpt_word_count = post.excerpt | number_of_words %}
{% if post.content != post.excerpt or excerpt_word_count > site.excerpt_length %}
<a href="{{ post.url | prepend: site.baseurl }}" class="post-read-more">[Read&nbsp;More]</a>
<div class="post-entry-container">
{% if post.image %}
<div class="post-image">
<a href="{{ post.url | prepend: site.baseurl }}">
<img src="{{ post.image }}">
</a>
</div>
{% endif %}
<div class="post-entry">
{{ post.excerpt | strip_html | xml_escape | truncatewords: site.excerpt_length }}
{% assign excerpt_word_count = post.excerpt | number_of_words %}
{% if post.content != post.excerpt or excerpt_word_count > site.excerpt_length %}
<a href="{{ post.url | prepend: site.baseurl }}" class="post-read-more">[Read&nbsp;More]</a>
{% endif %}
</div>
</div>
{% if post.tags.size > 0 %}