function loadXMLPosts(arr){
    return $.ajax({
        url: arr.url,
        type: 'GET',
        dataType: 'xml',
    })
    .done(function(response) {

        $(response).find('entry').each(function(){
            
            var title = $(this).find('title').text();
            var url = $(this).find('link').attr('href');
            var defaultDate = $(this).find('published').text();
            var date = moment(defaultDate, 'YYYY-MM-DDTHH:mm:ssZ').format('D MMMM YYYY');
            var authors = $(this).find('author name').text();
            var blog = arr.blog;

            allPosts.push({
                'title': title,
                'url': url,
                'date': date,
                'defaultDate': defaultDate,
                'authors': authors,
                'blog': blog
            });

        });

    });   
}
// Function to load posts from Jekyll/Hexo blog
Function to load posts from Jekyll/Hexo blog
Function to load posts from Jekyll / Hexo blog
function loadXMLPosts(arr){
    return $.ajax({
        url: arr.url,
        type: 'GET',
        dataType: 'xml',
    })
    .done(function(response) {
        $(response).find('entry').each(function(){
            var title = $(this).find('title').text();
            var url = $(this).find('link').attr('href');
            var defaultDate = $(this).find('published').text();
            var date = moment(defaultDate, 'YYYY-MM-DDTHH:mm:ssZ').format('D MMMM YYYY');
            var authors = $(this).find('author name').text();
            var blog = arr.blog;
            allPosts.push({
                'title': title,
                'url': url,
                'date': date,
                'defaultDate': defaultDate,
                'authors': authors,
                'blog': blog
            });
        });
    });   
}
function loadXMLPosts ( arr ) { return $ . ajax ( { url : arr . url , type : 'GET' , dataType : 'xml' , } ) . done ( function ( response ) { $ ( response ) . find ( 'entry' ) . each ( function ( ) { var title = $ ( this ) . find ( 'title' ) . text ( ) ; var url = $ ( this ) . find ( 'link' ) . attr ( 'href' ) ; var defaultDate = $ ( this ) . find ( 'published' ) . text ( ) ; var date = moment ( defaultDate , 'YYYY-MM-DDTHH:mm:ssZ' ) . format ( 'D MMMM YYYY' ) ; var authors = $ ( this ) . find ( 'author name' ) . text ( ) ; var blog = arr . blog ; allPosts . push ( { 'title' : title , 'url' : url , 'date' : date , 'defaultDate' : defaultDate , 'authors' : authors , 'blog' : blog } ) ; } ) ; } ) ; }
Function to load posts from Jekyll/Hexo blog
Function to load posts from Jekyll / Hexo blog