Hashnode has now gone pro-only for some features. Is there some method to import my hashnode posts to ghost ?
I intend to use Ghost 6 on an OpalStack VPS.
Hashnode has now gone pro-only for some features. Is there some method to import my hashnode posts to ghost ?
I intend to use Ghost 6 on an OpalStack VPS.
Almost certainly. Does Hashnode have an export format?
There are useful tools in the @tryghost migration repository, and gctools is another good resource.
There is an option to âBack up your articles and drafts to a GitHub repositoryâ - but right now thatâs under the PRO option only but I seem to have all my articles backed-up to my private GitHub prior to the PRO date. The articles are in .md in this format :
---
title: "xxx"
datePublished: Wed Mar 04 2020 10:37:34 GMT+0000 (Coordinated Universal Time)
cuid: xxx
slug: xxx-xxx-xxx
tags: xxx, xxx, xxx
---
Blog Content here
So, yes I have a list of all my posts as md files on my GitHub which is downloadable.
The ghst CLI might be a good place to start, if you have .md files:
Somebody also shared this tool theyâve build, which looks like it has a few more options, though itâs pretty new:
Using the ghost CLI :
ghst post create --markdown-file ./post1.md
Do I need to edit anything for ghst to ârecognizeâ the hashnode arguments - sync with the ghost parameters ?
title, datePublished, cuid, slug, cover, tags
title: âxxx xxxâ
datePublished: Fri Jan 31 2025 08:48:00 GMT+0000 (Coordinated Universal Time)
cuid: xxx
slug: xxx-xxx-xxx
cover: https://cdn.hashnode.com/path/to/images/xxx.jpeg
tags: xxx, xxx, xxx
Blog Content
I donât think it can do that out of the box. Not sure if any existing tool for Ghost can.
So, Iâd use them as starting points â I donât think there is a plug-and-play solution.
So whereâs my starting point to writing scripts in JavaScript to import a a bunch of .md files and sequentially run ghst post create --title `${post_title}` --markdown-file ./hashnode/post-1.md or something like that ?
If youâre comfortable with Javascript, the easier path would probably be a script that parses through your .md files and then talks to the Ghost Admin API directly:
Without ever having done this, this looks like something youâd want to use: