Table of contents
No headersvar changesuri = site.api & 'site/feed/new' & { limit: 10, format: "all", namespace: "main" };
var api = wiki.api(changesuri);
<div class="widget-new">
<ul>
foreach(var pg in api['entry'] ) {
<li>
// SET VARIABLES
var title = pg / 'title';
var datetime = pg / 'updated';
// FORMAT THE TITLE
if (string.contains(title,"/"))
{
let title = string.split(title,"/");
let title = title[#title-1];
}
// FORMAT THE DATE
let datetime = date.parse(datetime, "yyyy-MM-dd'T'HH:mm:ss'Z'");
let datetime = date.format(datetime,"ddd MMM dd, yyyy");
// OUTPUT THE LINK
web.link('/' .. pg / 'title', title);
<span class="date">
"( ";
datetime;
" )";
</span>
</li>
}
</ul>
</div>