Skip to content

Instantly share code, notes, and snippets.

@eneajaho
Created July 29, 2017 18:32
Show Gist options
  • Save eneajaho/c055317eec45c78c5cfb85bf0c81f1bb to your computer and use it in GitHub Desktop.
Save eneajaho/c055317eec45c78c5cfb85bf0c81f1bb to your computer and use it in GitHub Desktop.
<script type="text/javascript">
var totalposts = 200;
var standardstyling = true;
function showrecentposts(json) {
for (var a = 0; a < totalposts; a++) {
var entry = json.feed.entry[a];
var posttitle = entry.title.$t;
var posturl;
if (a == json.feed.entry.length) break;
for (var b = 0; b < entry.link.length; b++) {
if (entry.link[b].rel == 'alternate') {
posturl = entry.link[b].href;
postimg = entry
break;
}}
posttitle = posttitle.link(posturl);
if (standardstyling) document.write('<li>');
document.write(posttitle);}
if (standardstyling) document.write('</li>
');
}
</script>
<br />
<ul>
<h3>Label</h3>
<script src="https://blog-url.blogspot.com//feeds/posts/default/-/label?orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts&amp;max-results=999"></script>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment