-
-
Notifications
You must be signed in to change notification settings - Fork 275
/
news.page
29 lines (23 loc) · 864 Bytes
/
news.page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
title: News
in_menu: false
sort_info: 30
--- pipeline:tags,blocks,fragments
<h1>News</h1>
<a href="{relocatable: news.atom}">Atom-Feed</a>
<webgen:block name="newsdata" node="current" />
--- name:newsdata pipeline:erb
<%
opts = {:alcn => '/news/*.html', :sort => 'sort_info', :reverse => true, :flatten => true}
context.website.ext.item_tracker.add(context.dest_node, :nodes, :node_finder_option_set,
{:opts => opts, :ref_alcn => context.node.alcn}, :content)
context.website.ext.node_finder.find(opts, context.node).each do |node|
# context.options['contentprocessor.kramdown.options'] = {:auto_id_prefix => node.lcn.tr('.', '-')}
%>
<div class='news-item'>
<div class="news-date float-right">
Published on <%= node['created_at'].strftime("%A, %d %B %Y") %>
</div>
<%= context.render_block(:name => 'content', :chain => [node]) %>
</div>
<% end %>