add support for atom feeds

This commit is contained in:
Gonçalo Valério 2024-02-10 12:20:04 +00:00
parent b6cb960dee
commit 09a017b8d8
Signed by: dethos
GPG Key ID: DF557F2BDCC2445E
5 changed files with 38 additions and 31 deletions

View File

@ -55,12 +55,17 @@ async function handleRequest(request) {
response = new Response(content, {
headers: {
'content-type': 'application/rss+xml',
'Cache-Control': 'max-age=3600',
'Cache-Control': `max-age=${cacheMaxAge}`,
},
})
} else if (path === '/atom') {
let content = await WORKER_PLANET_STORE.get('atom')
response = new Response(content, {
headers: {
'content-type': 'application/atom+xml',
'Cache-Control': `max-age=${cacheMaxAge}`,
},
})
// } else if (path === '/atom') {
// let content = await WORKER_PLANET_STORE.get('atom')
// response = new Response(content)
} else {
return new Response('', { status: 404 })
}
@ -118,7 +123,7 @@ async function handleScheduled() {
let html = createHTML(content, sources)
// Store
await WORKER_PLANET_STORE.put('rss', feed.rss2())
//await WORKER_PLANET_STORE.put('atom', feed.atom1())
await WORKER_PLANET_STORE.put('atom', feed.atom1())
await WORKER_PLANET_STORE.put('html', html)
}

View File

@ -10,6 +10,7 @@
<meta property="og:description" content="{{page_description}}" />
<meta http-equiv="Content-Security-Policy" content="script-src https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js; style-src https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css 'sha256-G3Hryz5a3r//doprn3mQdVn71SMV/Wb1C6hMehrBGnk=';" />
<link rel="alternate" type="application/rss+xml" title="Planet RSS feed" href="/rss" />
<link rel="alternate" type="application/atom+xml" title="Planet Atom feed" href="/atom" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css"

View File

@ -8,17 +8,17 @@ templates['default'] = template({"1":function(container,depth0,helpers,partials,
};
return " <div class=\"row p-2\">\n <article>\n <div class=\"card\">\n <div class=\"card-body\">\n <h2 class=\"card-title\"><a href=\""
+ alias4(((helper = (helper = lookupProperty(helpers,"link") || (depth0 != null ? lookupProperty(depth0,"link") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"link","hash":{},"data":data,"loc":{"start":{"line":64,"column":44},"end":{"line":64,"column":52}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"link") || (depth0 != null ? lookupProperty(depth0,"link") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"link","hash":{},"data":data,"loc":{"start":{"line":65,"column":44},"end":{"line":65,"column":52}}}) : helper)))
+ "\">"
+ alias4(((helper = (helper = lookupProperty(helpers,"title") || (depth0 != null ? lookupProperty(depth0,"title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data,"loc":{"start":{"line":64,"column":54},"end":{"line":64,"column":63}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"title") || (depth0 != null ? lookupProperty(depth0,"title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data,"loc":{"start":{"line":65,"column":54},"end":{"line":65,"column":63}}}) : helper)))
+ "</a></h2>\n <p class=\"card-subtitle mb-2 text-muted\">\n <small>Date: "
+ alias4(((helper = (helper = lookupProperty(helpers,"pubDate") || (depth0 != null ? lookupProperty(depth0,"pubDate") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"pubDate","hash":{},"data":data,"loc":{"start":{"line":66,"column":27},"end":{"line":66,"column":38}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"pubDate") || (depth0 != null ? lookupProperty(depth0,"pubDate") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"pubDate","hash":{},"data":data,"loc":{"start":{"line":67,"column":27},"end":{"line":67,"column":38}}}) : helper)))
+ "</small><br>\n <small>Source: <a href=\""
+ alias4(((helper = (helper = lookupProperty(helpers,"source_link") || (depth0 != null ? lookupProperty(depth0,"source_link") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"source_link","hash":{},"data":data,"loc":{"start":{"line":67,"column":38},"end":{"line":67,"column":53}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"source_link") || (depth0 != null ? lookupProperty(depth0,"source_link") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"source_link","hash":{},"data":data,"loc":{"start":{"line":68,"column":38},"end":{"line":68,"column":53}}}) : helper)))
+ "\">"
+ alias4(((helper = (helper = lookupProperty(helpers,"source_title") || (depth0 != null ? lookupProperty(depth0,"source_title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"source_title","hash":{},"data":data,"loc":{"start":{"line":67,"column":55},"end":{"line":67,"column":71}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"source_title") || (depth0 != null ? lookupProperty(depth0,"source_title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"source_title","hash":{},"data":data,"loc":{"start":{"line":68,"column":55},"end":{"line":68,"column":71}}}) : helper)))
+ "</a></small>\n </p>\n\n "
+ ((stack1 = ((helper = (helper = lookupProperty(helpers,"content") || (depth0 != null ? lookupProperty(depth0,"content") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"content","hash":{},"data":data,"loc":{"start":{"line":70,"column":12},"end":{"line":70,"column":25}}}) : helper))) != null ? stack1 : "")
+ ((stack1 = ((helper = (helper = lookupProperty(helpers,"content") || (depth0 != null ? lookupProperty(depth0,"content") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"content","hash":{},"data":data,"loc":{"start":{"line":71,"column":12},"end":{"line":71,"column":25}}}) : helper))) != null ? stack1 : "")
+ "\n </div>\n </div>\n </article>\n </div>\n";
},"3":function(container,depth0,helpers,partials,data) {
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
@ -29,9 +29,9 @@ templates['default'] = template({"1":function(container,depth0,helpers,partials,
};
return " <li><a href=\""
+ alias4(((helper = (helper = lookupProperty(helpers,"link") || (depth0 != null ? lookupProperty(depth0,"link") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"link","hash":{},"data":data,"loc":{"start":{"line":96,"column":23},"end":{"line":96,"column":31}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"link") || (depth0 != null ? lookupProperty(depth0,"link") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"link","hash":{},"data":data,"loc":{"start":{"line":97,"column":23},"end":{"line":97,"column":31}}}) : helper)))
+ "\">"
+ alias4(((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data,"loc":{"start":{"line":96,"column":33},"end":{"line":96,"column":41}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data,"loc":{"start":{"line":97,"column":33},"end":{"line":97,"column":41}}}) : helper)))
+ "</a></li>\n";
},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
@ -47,13 +47,13 @@ templates['default'] = template({"1":function(container,depth0,helpers,partials,
+ alias4(((helper = (helper = lookupProperty(helpers,"page_title") || (depth0 != null ? lookupProperty(depth0,"page_title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_title","hash":{},"data":data,"loc":{"start":{"line":9,"column":37},"end":{"line":9,"column":51}}}) : helper)))
+ "\" />\n <meta property=\"og:description\" content=\""
+ alias4(((helper = (helper = lookupProperty(helpers,"page_description") || (depth0 != null ? lookupProperty(depth0,"page_description") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_description","hash":{},"data":data,"loc":{"start":{"line":10,"column":43},"end":{"line":10,"column":63}}}) : helper)))
+ "\" />\n <meta http-equiv=\"Content-Security-Policy\" content=\"script-src https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js; style-src https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css 'sha256-G3Hryz5a3r//doprn3mQdVn71SMV/Wb1C6hMehrBGnk=';\" />\n <link rel=\"alternate\" type=\"application/rss+xml\" title=\"Planet RSS feed\" href=\"/rss\" />\n <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\"\n integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\" />\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css\"\n integrity=\"sha256-PDJQdTN7dolQWDASIoBVrjkuOEaI137FI15sqI3Oxu8=\" crossorigin=\"anonymous\" />\n <style>\n img {\n width: 100% !important;\n max-width:100% !important;\n height: auto;\n }\n code {\n display: block;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n }\n video {\n max-width: 100%;\n }\n </style>\n</head>\n\n<body>\n <nav class=\"navbar navbar-expand-lg navbar-light bg-light\">\n <div class=\"container-fluid\">\n <a class=\"navbar-brand\" href=\"#\">"
+ alias4(((helper = (helper = lookupProperty(helpers,"page_title") || (depth0 != null ? lookupProperty(depth0,"page_title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_title","hash":{},"data":data,"loc":{"start":{"line":37,"column":39},"end":{"line":37,"column":53}}}) : helper)))
+ "\" />\n <meta http-equiv=\"Content-Security-Policy\" content=\"script-src https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js; style-src https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css 'sha256-G3Hryz5a3r//doprn3mQdVn71SMV/Wb1C6hMehrBGnk=';\" />\n <link rel=\"alternate\" type=\"application/rss+xml\" title=\"Planet RSS feed\" href=\"/rss\" />\n <link rel=\"alternate\" type=\"application/atom+xml\" title=\"Planet Atom feed\" href=\"/atom\" />\n <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\"\n integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\" />\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css\"\n integrity=\"sha256-PDJQdTN7dolQWDASIoBVrjkuOEaI137FI15sqI3Oxu8=\" crossorigin=\"anonymous\" />\n <style>\n img {\n width: 100% !important;\n max-width:100% !important;\n height: auto;\n }\n code {\n display: block;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n }\n video {\n max-width: 100%;\n }\n </style>\n</head>\n\n<body>\n <nav class=\"navbar navbar-expand-lg navbar-light bg-light\">\n <div class=\"container-fluid\">\n <a class=\"navbar-brand\" href=\"#\">"
+ alias4(((helper = (helper = lookupProperty(helpers,"page_title") || (depth0 != null ? lookupProperty(depth0,"page_title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_title","hash":{},"data":data,"loc":{"start":{"line":38,"column":39},"end":{"line":38,"column":53}}}) : helper)))
+ "</a>\n <ul class=\"navbar-nav ms-auto\">\n <li class=\"nav-item\">\n <a class=\"nav-link active\" aria-current=\"page\" href=\"/rss\">\n <i class=\"bi bi-rss\" role=\"img\" aria-label=\"RSS\"></i> RSS Feed\n </a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link active\" aria-current=\"page\" href=\"https://github.com/dethos/worker-planet\">\n <i class=\"bi bi-github\" role=\"img\" aria-label=\"GitHub\"></i> Source Code\n </a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link active\" aria-current=\"page\" data-bs-toggle=\"offcanvas\" data-bs-target=\"#aboutPanel\" aria-controls=\"offcanvasRight\" href=\"#\">\n <i class=\"bi bi-patch-question\" role=\"img\" aria-label=\"About\"></i> About\n </a>\n </li>\n </ul>\n </div>\n </nav>\n\n <main class=\"container d-grid\">\n"
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"items") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":59,"column":4},"end":{"line":75,"column":13}}})) != null ? stack1 : "")
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"items") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":60,"column":4},"end":{"line":76,"column":13}}})) != null ? stack1 : "")
+ " </main>\n <footer class=\"footer mt-auto py-3 bg-light\">\n <div class=\"container-fluid\">\n <p class=\"text-muted\">\n <span>All rights belong to the original authors. Powered by <a href=\"https://github.com/dethos/worker-planet\">worker-planet</a>.</span>\n <span class=\"float-end\"><a href=\"#\">Back to top</a></span>\n </p>\n </div>\n </footer>\n <div class=\"offcanvas offcanvas-end\" tabindex=\"-1\" id=\"aboutPanel\" aria-labelledby=\"aboutLabel\">\n <div class=\"offcanvas-header\">\n <h4 id=\"aboutLabel\">About</h4>\n <button type=\"button\" class=\"btn-close text-reset\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\"></button>\n </div>\n <div class=\"offcanvas-body\">\n <p>"
+ alias4(((helper = (helper = lookupProperty(helpers,"page_description") || (depth0 != null ? lookupProperty(depth0,"page_description") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_description","hash":{},"data":data,"loc":{"start":{"line":91,"column":9},"end":{"line":91,"column":29}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"page_description") || (depth0 != null ? lookupProperty(depth0,"page_description") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_description","hash":{},"data":data,"loc":{"start":{"line":92,"column":9},"end":{"line":92,"column":29}}}) : helper)))
+ "</p>\n\n <h5>Sources</h5>\n <ul>\n"
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"sources") : depth0),{"name":"each","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":95,"column":8},"end":{"line":97,"column":17}}})) != null ? stack1 : "")
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"sources") : depth0),{"name":"each","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":96,"column":8},"end":{"line":98,"column":17}}})) != null ? stack1 : "")
+ " </ul>\n </div>\n </div>\n <script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js\"\n integrity=\"sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4\" crossorigin=\"anonymous\"></script>\n</body>\n\n</html>\n";
},"useData":true});

View File

@ -9,6 +9,7 @@
<meta property="og:description" content="{{page_description}}" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-hashes' 'sha256-2drSom6Fplo+OFvNUVKnb+wZyrq6v1lOEkVaexi/Fw4=' 'sha256-JeTyInHTbNelTT9AfPH8MBCkB4sU4yMQjoaIQNeLIZ8='; style-src https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css;" />
<link rel="alternate" type="application/rss+xml" title="Planet RSS feed" href="/rss" />
<link rel="alternate" type="application/atom+xml" title="Planet Atom feed" href="/atom" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css">
</head>
<body>

View File

@ -7,17 +7,17 @@ templates['headlines'] = template({"1":function(container,depth0,helpers,partial
return undefined
};
return ((stack1 = (lookupProperty(helpers,"isRowElemN")||(depth0 && lookupProperty(depth0,"isRowElemN"))||alias2).call(alias1,(data && lookupProperty(data,"index")),4,0,{"name":"isRowElemN","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":35,"column":8},"end":{"line":37,"column":23}}})) != null ? stack1 : "")
return ((stack1 = (lookupProperty(helpers,"isRowElemN")||(depth0 && lookupProperty(depth0,"isRowElemN"))||alias2).call(alias1,(data && lookupProperty(data,"index")),4,0,{"name":"isRowElemN","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":36,"column":8},"end":{"line":38,"column":23}}})) != null ? stack1 : "")
+ " <article>\n <hgroup>\n <h3>"
+ alias4(((helper = (helper = lookupProperty(helpers,"title") || (depth0 != null ? lookupProperty(depth0,"title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data,"loc":{"start":{"line":40,"column":18},"end":{"line":40,"column":27}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"title") || (depth0 != null ? lookupProperty(depth0,"title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data,"loc":{"start":{"line":41,"column":18},"end":{"line":41,"column":27}}}) : helper)))
+ "</h2>\n <small>"
+ alias4(((helper = (helper = lookupProperty(helpers,"formattedDate") || (depth0 != null ? lookupProperty(depth0,"formattedDate") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"formattedDate","hash":{},"data":data,"loc":{"start":{"line":41,"column":21},"end":{"line":41,"column":38}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"formattedDate") || (depth0 != null ? lookupProperty(depth0,"formattedDate") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"formattedDate","hash":{},"data":data,"loc":{"start":{"line":42,"column":21},"end":{"line":42,"column":38}}}) : helper)))
+ "</small>\n </hgroup>\n <p>\n "
+ ((stack1 = ((helper = (helper = lookupProperty(helpers,"description") || (depth0 != null ? lookupProperty(depth0,"description") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"description","hash":{},"data":data,"loc":{"start":{"line":44,"column":14},"end":{"line":44,"column":31}}}) : helper))) != null ? stack1 : "")
+ ((stack1 = ((helper = (helper = lookupProperty(helpers,"description") || (depth0 != null ? lookupProperty(depth0,"description") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"description","hash":{},"data":data,"loc":{"start":{"line":45,"column":14},"end":{"line":45,"column":31}}}) : helper))) != null ? stack1 : "")
+ "\n </p>\n <p>\n <a href=\""
+ alias4(((helper = (helper = lookupProperty(helpers,"link") || (depth0 != null ? lookupProperty(depth0,"link") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"link","hash":{},"data":data,"loc":{"start":{"line":47,"column":23},"end":{"line":47,"column":31}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"link") || (depth0 != null ? lookupProperty(depth0,"link") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"link","hash":{},"data":data,"loc":{"start":{"line":48,"column":23},"end":{"line":48,"column":31}}}) : helper)))
+ "\">More</a>\n </p>\n </article>\n"
+ ((stack1 = (lookupProperty(helpers,"isRowElemN")||(depth0 && lookupProperty(depth0,"isRowElemN"))||alias2).call(alias1,(data && lookupProperty(data,"index")),4,3,{"name":"isRowElemN","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":50,"column":8},"end":{"line":52,"column":23}}})) != null ? stack1 : "");
+ ((stack1 = (lookupProperty(helpers,"isRowElemN")||(depth0 && lookupProperty(depth0,"isRowElemN"))||alias2).call(alias1,(data && lookupProperty(data,"index")),4,3,{"name":"isRowElemN","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":51,"column":8},"end":{"line":53,"column":23}}})) != null ? stack1 : "");
},"2":function(container,depth0,helpers,partials,data) {
return " <div class=\"grid\">\n";
},"4":function(container,depth0,helpers,partials,data) {
@ -31,9 +31,9 @@ templates['headlines'] = template({"1":function(container,depth0,helpers,partial
};
return " <li><a href=\""
+ alias4(((helper = (helper = lookupProperty(helpers,"link") || (depth0 != null ? lookupProperty(depth0,"link") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"link","hash":{},"data":data,"loc":{"start":{"line":72,"column":27},"end":{"line":72,"column":35}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"link") || (depth0 != null ? lookupProperty(depth0,"link") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"link","hash":{},"data":data,"loc":{"start":{"line":73,"column":27},"end":{"line":73,"column":35}}}) : helper)))
+ "\">"
+ alias4(((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data,"loc":{"start":{"line":72,"column":37},"end":{"line":72,"column":45}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data,"loc":{"start":{"line":73,"column":37},"end":{"line":73,"column":45}}}) : helper)))
+ "</a></li>\n";
},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
@ -49,13 +49,13 @@ templates['headlines'] = template({"1":function(container,depth0,helpers,partial
+ alias4(((helper = (helper = lookupProperty(helpers,"page_title") || (depth0 != null ? lookupProperty(depth0,"page_title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_title","hash":{},"data":data,"loc":{"start":{"line":8,"column":39},"end":{"line":8,"column":53}}}) : helper)))
+ "\" />\n <meta property=\"og:description\" content=\""
+ alias4(((helper = (helper = lookupProperty(helpers,"page_description") || (depth0 != null ? lookupProperty(depth0,"page_description") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_description","hash":{},"data":data,"loc":{"start":{"line":9,"column":45},"end":{"line":9,"column":65}}}) : helper)))
+ "\" />\n <meta http-equiv=\"Content-Security-Policy\" content=\"script-src 'self' 'unsafe-hashes' 'sha256-2drSom6Fplo+OFvNUVKnb+wZyrq6v1lOEkVaexi/Fw4=' 'sha256-JeTyInHTbNelTT9AfPH8MBCkB4sU4yMQjoaIQNeLIZ8='; style-src https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css;\" />\n <link rel=\"alternate\" type=\"application/rss+xml\" title=\"Planet RSS feed\" href=\"/rss\" />\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css\">\n </head>\n <body>\n <nav class=\"container\">\n <ul>\n <li></li>\n </ul>\n <ul>\n <li><a href=\"/rss\">RSS</a></li>\n <li><a href=\"https://github.com/dethos/worker-planet\">Code</a></li>\n <li><a href=\"#open\" onclick=\"document.getElementById('sources').setAttribute('open', '');\">Sources</a></li>\n </ul>\n </nav>\n <main class=\"container-fluid\">\n <div class=\"grid\">\n <div class=\"container\">\n <hgroup>\n <h1>"
+ alias4(((helper = (helper = lookupProperty(helpers,"page_title") || (depth0 != null ? lookupProperty(depth0,"page_title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_title","hash":{},"data":data,"loc":{"start":{"line":29,"column":16},"end":{"line":29,"column":30}}}) : helper)))
+ "\" />\n <meta http-equiv=\"Content-Security-Policy\" content=\"script-src 'self' 'unsafe-hashes' 'sha256-2drSom6Fplo+OFvNUVKnb+wZyrq6v1lOEkVaexi/Fw4=' 'sha256-JeTyInHTbNelTT9AfPH8MBCkB4sU4yMQjoaIQNeLIZ8='; style-src https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css;\" />\n <link rel=\"alternate\" type=\"application/rss+xml\" title=\"Planet RSS feed\" href=\"/rss\" />\n <link rel=\"alternate\" type=\"application/atom+xml\" title=\"Planet Atom feed\" href=\"/atom\" />\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css\">\n </head>\n <body>\n <nav class=\"container\">\n <ul>\n <li></li>\n </ul>\n <ul>\n <li><a href=\"/rss\">RSS</a></li>\n <li><a href=\"https://github.com/dethos/worker-planet\">Code</a></li>\n <li><a href=\"#open\" onclick=\"document.getElementById('sources').setAttribute('open', '');\">Sources</a></li>\n </ul>\n </nav>\n <main class=\"container-fluid\">\n <div class=\"grid\">\n <div class=\"container\">\n <hgroup>\n <h1>"
+ alias4(((helper = (helper = lookupProperty(helpers,"page_title") || (depth0 != null ? lookupProperty(depth0,"page_title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_title","hash":{},"data":data,"loc":{"start":{"line":30,"column":16},"end":{"line":30,"column":30}}}) : helper)))
+ "</h1>\n <h3>"
+ alias4(((helper = (helper = lookupProperty(helpers,"page_description") || (depth0 != null ? lookupProperty(depth0,"page_description") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_description","hash":{},"data":data,"loc":{"start":{"line":30,"column":16},"end":{"line":30,"column":36}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"page_description") || (depth0 != null ? lookupProperty(depth0,"page_description") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page_description","hash":{},"data":data,"loc":{"start":{"line":31,"column":16},"end":{"line":31,"column":36}}}) : helper)))
+ "</h3>\n </hgroup>\n </div>\n </div>\n"
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"items") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":34,"column":6},"end":{"line":53,"column":15}}})) != null ? stack1 : "")
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"items") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":35,"column":6},"end":{"line":54,"column":15}}})) != null ? stack1 : "")
+ " </main>\n <footer>\n <div class=\"container\">\n <p>\n All rights belong to the original authors. Powered by <a href=\"https://github.com/dethos/worker-planet\">worker-planet</a>.\n </p>\n </div>\n </footer>\n <dialog id=\"sources\">\n <article>\n <header>\n <a href=\"#close\" aria-label=\"Close\" class=\"close\" onclick=\"document.getElementById('sources').removeAttribute('open');\"></a>\n Sources\n </header>\n <p>The content of this page is fetched from the following sources:</p>\n <p>\n <ul>\n"
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"sources") : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":71,"column":12},"end":{"line":73,"column":21}}})) != null ? stack1 : "")
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"sources") : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":72,"column":12},"end":{"line":74,"column":21}}})) != null ? stack1 : "")
+ " </ul>\n </p>\n </article>\n </dialog>\n </body>\n</html>";
},"useData":true});