All my posts about various bits of code and projects

Jekyll Snippets
Had a go at converting a mostly static but dynamically rendered site to use Jekyll yesterday, it was a lot more straight forward than I thought it was going to be. As part of the conversion I needed to display the first post differently, after consulting the all knowing Google I settled on the following method; Jekyll Snippets 1/3 {% for post in site.posts offset: 0 limit: 1 %} <div class="some-style"> <a href="{{post.url}}"> <h3 class='news-title'>{{ post.title }}</h3> <span class='news-date'>{{ post.date | date_to_string }}</span> </a> <p>{{ page.excerpt }} <a href='{{post.url}}'><span class='read-more'> Read more</span></a></p> </div> {% endfor %} ...