summaryrefslogtreecommitdiff
path: root/source/news.html.erb
diff options
context:
space:
mode:
authorLars Henrik Mai <lars.mai@kontinui.de>2014-04-08 15:48:53 +0200
committerLars Henrik Mai <lars.mai@kontinui.de>2014-04-08 15:48:53 +0200
commit9cbb3e63db68bfc7d38a8b1368d61dd9456af446 (patch)
treecf933b63fd5d171e5b8d10ed25fb73a9a185ee26 /source/news.html.erb
parentb0da6603c012280a33202836bb1e9a2456fbd054 (diff)
blog lives in /news, add some config stuff
Diffstat (limited to 'source/news.html.erb')
-rw-r--r--source/news.html.erb24
1 files changed, 24 insertions, 0 deletions
diff --git a/source/news.html.erb b/source/news.html.erb
new file mode 100644
index 0000000..0fae27e
--- /dev/null
+++ b/source/news.html.erb
@@ -0,0 +1,24 @@
+---
+pageable: true
+per_page: 10
+---
+<% if paginate && num_pages > 1 %>
+ <p>Page <%= page_number %> of <%= num_pages %></p>
+
+ <% if prev_page %>
+ <p><%= link_to 'Previous page', prev_page %></p>
+ <% end %>
+<% end %>
+
+<% page_articles.each_with_index do |article, i| %>
+ <h2><%= link_to article.title, article %> <span><%= article.date.strftime('%b %e') %></span></h2>
+ <!-- use article.summary(250) if you have Nokogiri available to show just
+ the first 250 characters -->
+ <%= article.body %>
+<% end %>
+
+<% if paginate %>
+ <% if next_page %>
+ <p><%= link_to 'Next page', next_page %></p>
+ <% end %>
+<% end %>