Created
July 31, 2012 11:29
-
-
Save Chrisedmo/3216357 to your computer and use it in GitHub Desktop.
Shopify: Latest Blog Posts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.widget .latest-blog-posts-list { | |
margin: 0; | |
list-style: none; | |
} | |
.widget .latest-blog-posts-list li { | |
margin: 0 0 10px 0; | |
padding: 0 0 10px 0; | |
border-bottom: dotted 1px #CCC; | |
background: none; | |
word-wrap: break-word; | |
line-height: 1.3em; | |
list-style: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
Edit the 2 values right below: what's your blog handle and how many articles do you want to show? | |
{% endcomment %} | |
{% assign your_blog_handle_here = 'news' %} | |
{% assign how_many_articles_to_show = 5 %} | |
<!-- START OF LATEST BLOG POSTS --> | |
<div class="widget"> | |
<div class="widget-header"> | |
<h3>Latest Blog Posts</h3> | |
</div> | |
<div class="latest-blog-posts-wrapper"> | |
<ul class="latest-blog-posts-list"> | |
{% for article in blogs[your_blog_handle_here].articles limit: how_many_articles_to_show %} | |
<li>{{ article.title | link_to: article.url }}</li> | |
{% endfor %} | |
</ul> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this