blogtraversy
blogtraversy copied to clipboard
NPM Package that fetches all your blogs from Hashnode and Medium

Blog Traversy
Try it out LIVE! | Active Issues |
Issue Report
A tool which helps you to fetch your articles from all the publications like medium and hashnode and show it on your custom blog.
Getting Started
Installation
The easiest way to install blogtraversy is using NPM. If you have Node.js installed, it is most likely that you have NPM installed as well
$ npm install blogtraversy
Usage
- Add the following to
index.js
const {getBlogs} = require('blogtraversy')
- A
usernamesconfig file is recommended. For now, you can use like this.
const {getBlogs} = require('blogtraversy')
const usernames = {
mediumUsername:'abirwrites',
hashnodeUsername:'imabp'
}
- Call GetBlogs based on your requirement passing your
usernamesconfig.
getBlogs('all',usernames).then((res)=>console.log("All Blogs=>",res));
getBlogs('medium',usernames).then((res)=>console.log("Medium Blogs=>",res));
getBlogs('hashnode',usernames).then((res)=>console.log("Hashnode Blogs",res));
- The received
resconsists of the following array of objects.
//getBlogs('all',usernames)
res= {
mediumArticles:[
{
url: string,
title: string,
thumbnail: string
}
],
hashnodePosts:[
{
url: string,
title: string,
thumbnail: string
}
]
}
//getBlogs('medium',usernames)
res =[
{
url: string,
title: string,
thumbnail: string
}
]
//getBlogs('hashnode',usernames)
res =[
{
url: string,
title: string,
thumbnail: string
}
]
Contribution
For contributions, please go through active issues