Skip to content

Commit

Permalink
Move contents of the index.html page to the 'home' layout
Browse files Browse the repository at this point in the history
  • Loading branch information
parkr committed Sep 26, 2016
1 parent 3f5d431 commit 1201920
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
26 changes: 26 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout: default
---

<div class="home">

<h1 class="page-heading">Posts</h1>

{% assign custom_url = site.url | append: site.baseurl %}
{% assign full_base_url = custom_url | default: site.github.url %}

<ul class="post-list">
{% for post in site.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>

<h2>
<a class="post-link" href="{{ post.url | prepend: full_base_url }}">{{ post.title | escape }}</a>
</h2>
</li>
{% endfor %}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: full_base_url }}">via RSS</a></p>

</div>
25 changes: 1 addition & 24 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
---
layout: default
layout: home
---

<div class="home">

<h1 class="page-heading">Posts</h1>

{% assign custom_url = site.url | append: site.baseurl %}
{% assign full_base_url = custom_url | default: site.github.url %}

<ul class="post-list">
{% for post in site.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>

<h2>
<a class="post-link" href="{{ post.url | prepend: full_base_url }}">{{ post.title | escape }}</a>
</h2>
</li>
{% endfor %}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: full_base_url }}">via RSS</a></p>

</div>

0 comments on commit 1201920

Please sign in to comment.