Skip to content

Fetch data from Google Blogger API to list all posts of a blog by time.

License

Notifications You must be signed in to change notification settings

5j54d93/Blogger-All-Posts-List

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blogger All Post List

CodeQL GitHub GitHub Repo stars GitHub repo size

Fetch data from Google Blogger API to list all posts of a blog by time.

Demo page:sharing-life-in-tw.blogspot.com/p/all-posts.html

Explanation

URL

var feedUrl = 'https://sharing-life-in-tw.blogspot.com/feeds/posts/default?max-results=9999&alt=json-in-script&callback=myFunc';

You could change sharing-life-in-tw.blogspot.com to your Blogger url.

Separate Posts by Month

if(entries[i].published.$t.substr(0,7) != date) {
  html.push(' <a class="day-blue night fs-4 lh-lg" href="https://sharing-life-in-tw.blogspot.com/');
  html.push(entries[i].published.$t.substr(0,4));
  html.push('/');
  html.push(entries[i].published.$t.substr(5,2));
  html.push('/" style="text-decoration:none;" >');
  html.push(entries[i].published.$t.substr(0,4));
  html.push(' 年 ');
  html.push(entries[i].published.$t.substr(5,2));
  html.push(' 月');
  html.push('<'+'/a>');
  html.push('<'+'br />');
  date = entries[i].published.$t.substr(0,7);
}

Display Posts by List

html.push('<'+'li>')
html.push(entries[i].published.$t.substr(5,2));
html.push('/');
html.push(entries[i].published.$t.substr(8,2));
html.push(': <a class="day-blue night lh-base" href="');
html.push(entries[i].link[4].href);
html.push('" style="text-decoration:none;" >');
html.push(entries[i].title.$t);
html.push('<'+'/a>');
html.push('<'+'/li>');

License:MIT

This package is MIT licensed.