example/tmpl/atom.template

Tue, 16 Jan 2018 17:24:27 +0000

author
Tuomo Valkonen <tuomov@liverpool.ac.uk>
date
Tue, 16 Jan 2018 17:24:27 +0000
changeset 12
5541f9577f27
parent 10
118ab361da29
permissions
-rw-r--r--

Bitbucket didn't like <...> around email using HTML, so use Unicode

<?xml version="1.0" encoding="utf-8" ?>
<%
require('plugin.inline') 
require('time')
%>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html"><%= page.meta.title %></title>
  <subtitle type="html"><%= page.meta.description %></subtitle>
  <author>
    <name><%= page.meta.author %></name>
    <uri><%= page.meta.author_url %></uri>
  </author>

  <% local feedurl = page.meta.site_url..page.destination %>
  <link href="<%= page.meta.site_url %>" rel="alternate" type="text/xhtml" />
  <link href="<%= feedurl %>" rel="self" type="application/atom+xml" />
  <updated><%= time.now_iso() %></updated>
  <id><%= page.meta.site_url %></id>

  <%= plugin.inline.inline(env, {
        pattern=page.meta.dependencies,
        count=page.meta.count, 
        template='inline_atom.template',
        absolute=page.meta.site_url,
     })
  %>
</feed>

mercurial