Skip to content

Instantly share code, notes, and snippets.

@jonathancounihan
Forked from nimbupani/index.html
Created November 20, 2017 10:43
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 jonathancounihan/806f0c1f5044a457a8b9e58052c8ddec to your computer and use it in GitHub Desktop.
Save jonathancounihan/806f0c1f5044a457a8b9e58052c8ddec to your computer and use it in GitHub Desktop.
Showing latest post on home page with Jekyll
---
layout: default
---
<div class="blog-index">
{% assign post = site.posts.first %}
{% assign content = post.content %}
{% include post_detail.html %}
</div>
<h1 class="entry-title">
{% if page.title %}
<a href="{{ root_url }}{{ page.url }}">{{ page.title }}</a>
{% endif %}
{% if post.title %}
<a href="{{ root_url }}{{ post.url }}">{{ post.title }}</a>
{% endif %}
</h1>
<div class="entry-content">{{ content }}</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment