bibi archive

This commit is contained in:
Eloïse Piret 2016-09-22 21:23:40 +02:00
parent 91b64afaa1
commit de0b47e4df
3 changed files with 3 additions and 14 deletions

4
Rules
View file

@ -29,7 +29,7 @@ preprocess do
@items.create(
'',
{ academic_year: year, title: "Blog" },
"/archives/#{year}-#{year + 1}.html",
"/blog/#{year}-#{year + 1}.html",
binary: false
)
end
@ -50,7 +50,7 @@ end
#
# ARCHIVES
#
compile '/archives/*' do
compile '/blog/*' do
layout '/archive_page.*'
layout '/generic.*'
layout '/default.*'

View file

@ -1,11 +0,0 @@
---
navigable: true
title: Archieven
---
<ul class = "archive_list">
<% academic_years_items.each do |year, item| %>
<li>
<%= link_to pretty_year(year), item %>
</li>
<% end %>
</ul>

View file

@ -11,7 +11,7 @@ module ArchiveHelper
end
def academic_years_items
academic_years.to_a.reverse.map { |y| [y, items["/archives/#{y}-#{y + 1}.html"]] }.to_h
academic_years.to_a.reverse.map { |y| [y, items["/blog/#{y}-#{y + 1}.html"]] }.to_h
end
def pretty_year(year)