Skip to content

Instantly share code, notes, and snippets.

@corntoole
Last active February 24, 2019 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corntoole/7da7c29144913fd0f56e956a3e2d7b56 to your computer and use it in GitHub Desktop.
Save corntoole/7da7c29144913fd0f56e956a3e2d7b56 to your computer and use it in GitHub Desktop.
IndieWeb Blog Archive Format
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="h-feed">
<h2>${jsonFeed.title}</h2>
<p>${jsonFeed.home_page_url}</p>
${jsonFeed.author ? "<p>"+jsonFeed.author.name+"</p>" : ""}
<ul>
<!-- for each feed entry -->
<li>
<div class="h-entry">
<p class="p-name">${item.title ? item.title : item.url}</p> <!-- what should we do about title-less posts? -->
<a class="u-url" href="${item.url}">${item.url}</a>
<p class="dt-published">Published on ${item.date_published}</p>
${item.author ? "
<p> by"+item.author.name+"</p>" : ""}
<div class="e-content"> ${item.content_html}</div>
</div>
</li>
<!-- ... -->
</ul>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment