0 I'm wondering if I can run a Node.js script in my Jekyll page from GitHub Pages or Amazon S3? I think it can't run on GitHub Pages since it doesn't support server side code. Not too sure. The code is below: var Airtable = require('airtable'); var base = new Airtable(apiKey: 'YOUR_API_KEY').base('appAnZVyYqusNPV5Q'); base('Invitee list').select( // Selecting the first 3 records in Complete list: maxRecords: 3, view: "Complete list" ).eachPage(function page(records, fetchNextPage) // This function (`page`) will get called for each page of records. records.forEach(function(record) console.log('Retrieved', record.get('Email')); ); // To fetch the next page of records, call `fetchNextPage`. // If there are more records, `page` will get called again. // If there are no more records, `done` will get called. fetchNextPage(); , function done(err) if (err) console.error(err); return; ); node.js
(function() {
var items = ['id': '4921865203192176143', 'body': 'Yee! First Comment! By the way this awesome..... :) x3cbr /x3ePlease can you tell me a tip or trick to improve my site performance i update it daily but Google Pagerank, Alexa Rank is not incresing :( x3cbr /x3eThis is my site-x3cbr /x3ex3ca hrefx3dx22http://www.placeforcompinfo.co.vu/x22 relx3dx22nofollowx22x3ePFCI Tech!x3c/ax3e', 'timestamp': '1407848625389', 'permalink': 'https://www.mybloggertricks.com/2014/08/embed-tweet-within-a-tweet.html?showCommentx3d1407848625389#c4921865203192176143', 'author': 'name': 'Anonymous', 'avatarUrl': '//img1.blogblog.com/img/blank.gif', 'profileUrl': '', 'displayTime': 'Aug 12, 2014, 6:03:00 PM', 'deleteclass': 'item-control blog-admin pid-2030781868'];
var msgs = 'loadMore': 'Load more...', 'loading': 'Loading...', 'loaded': 'No more!', 'addComment': 'Add comment', 'reply': 'Reply', 'delete': 'Delete';
var config = 'blogId': '8193278726666811965', 'postId': '6289906354436876373', 'feed': 'https://www.mybloggertricks.com/feeds/6289906354436876373/comments/default', 'authorName': 'Qasim Zaib', 'authorUrl': 'https://www.blogger.com/profile/08938578237404814539', 'baseUri': 'https://www.blogger.com', 'maxThreadDepth': 2;
// 0)
cursor = parseInt(items[items.length - 1].timestamp) + 1;
var bodyFromEntry = function(entry)
if (entry.gd$extendedProperty)
for (var k in entry.gd$extendedProperty)
if (entry.gd$extendedProperty[k].name == 'blogger.contentRemoved')
return '' + entry.content.$t + '';
return entry.content.$t;
var parse = function(data)
cursor = null;
var comments = ;
if (data && data.feed && data.feed.entry)
for (var i = 0, entry; entry = data.feed.entry[i]; i++)
var comment = ;
// comment ID, parsed out of the original id format
var id = /blog-(d+).post-(d+)/.exec(entry.id.$t);
comment.id = id ? id[2] : null;
comment.body = bodyFromEntry(entry);
comment.timestamp = Date.parse(entry.published.$t) + '';
if (entry.author && entry.author.constructor === Array)
var auth = entry.author[0];
if (auth)
comment.author =
name: (auth.name ? auth.name.$t : undefined),
profileUrl: (auth.uri ? auth.uri.$t : undefined),
avatarUrl: (auth.gd$image ? auth.gd$image.src : undefined)
;
if (entry.link)
if (entry.link[2])
comment.link = comment.permalink = entry.link[2].href;
if (entry.link[3])
var pid = /.*comments/default/(d+)?.*/.exec(entry.link[3].href);
if (pid && pid[1])
comment.parentId = pid[1];
comment.deleteclass = 'item-control blog-admin';
if (entry.gd$extendedProperty)
for (var k in entry.gd$extendedProperty)
if (entry.gd$extendedProperty[k].name == 'blogger.itemClass')
comment.deleteclass += ' ' + entry.gd$extendedProperty[k].value;
else if (entry.gd$extendedProperty[k].name == 'blogger.displayTime')
comment.displayTime = entry.gd$extendedProperty[k].value;
comments.push(comment);
return comments;
;
var paginator = function(callback) {
if (hasMore()) {
var url = config.feed + '?alt=json&v=2&orderby=published&reverse=false&max-results=50';
if (cursor)
url += '&published-min=' + new Date(cursor).toISOString();
window.bloggercomments = function(data) {
var parsed = parse(data);
cursor = parsed.length
AnonymousAug 12, 2014, 6:03:00 PM
Yee! First Comment! By the way this awesome..... :)
Please can you tell me a tip or trick to improve my site performance i update it daily but Google Pagerank, Alexa Rank is not incresing :(
This is my site-
PFCI Tech!
ReplyDelete