bibi archive
This commit is contained in:
parent
91b64afaa1
commit
de0b47e4df
3 changed files with 3 additions and 14 deletions
4
Rules
4
Rules
|
@ -29,7 +29,7 @@ preprocess do
|
||||||
@items.create(
|
@items.create(
|
||||||
'',
|
'',
|
||||||
{ academic_year: year, title: "Blog" },
|
{ academic_year: year, title: "Blog" },
|
||||||
"/archives/#{year}-#{year + 1}.html",
|
"/blog/#{year}-#{year + 1}.html",
|
||||||
binary: false
|
binary: false
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -50,7 +50,7 @@ end
|
||||||
#
|
#
|
||||||
# ARCHIVES
|
# ARCHIVES
|
||||||
#
|
#
|
||||||
compile '/archives/*' do
|
compile '/blog/*' do
|
||||||
layout '/archive_page.*'
|
layout '/archive_page.*'
|
||||||
layout '/generic.*'
|
layout '/generic.*'
|
||||||
layout '/default.*'
|
layout '/default.*'
|
||||||
|
|
|
@ -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>
|
|
|
@ -11,7 +11,7 @@ module ArchiveHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def academic_years_items
|
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
|
end
|
||||||
|
|
||||||
def pretty_year(year)
|
def pretty_year(year)
|
||||||
|
|
Loading…
Reference in a new issue