Skip to content

Instantly share code, notes, and snippets.

@ejamesc
Last active September 11, 2018 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ejamesc/3059fb5ffda2470653c3f8497bb5f2b9 to your computer and use it in GitHub Desktop.
Save ejamesc/3059fb5ffda2470653c3f8497bb5f2b9 to your computer and use it in GitHub Desktop.
Modified home.hbs
{{!-- CHANGE this filter to filter for the category you'd like --}}
{{#get "posts" filter="tag:[gear]" limit="4" as |books|}}
{{#if books}}
<div class='row'>
<div class='small-12 columns'>
{{!-- CHANGE this url to "/tag/<tagname>" to link to the tag addres --}}
<h2 class='home__books-section-heading'><a class="home__books-section-heading__a" href="{{@blog.url}}/tag/gear">{{t "Book Summaries"}}</a></h2>
</div>
</div>
<div class='row home__books'>
{{#foreach books}}
<div class='small-12 medium-6 large-3 {{#if @last}}end{{/if}} columns'>
<a href='{{url}}'><img class="home__books-img" src="{{img_url feature_image}}" alt="{{t "Feature image for"}} {{title}}"/></a>
<h3 class="home__books-header"><a class="home__books-link" href="{{url}}">{{{title}}}</a></h3>
<p class="home__books-excerpt">{{excerpt words="20"}}{{#unless custom_excerpt}}&hellip;{{/unless}}</p>
</div>
{{/foreach}}
</div>
{{/if}}
{{/get}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment