Better Hashnode Backups

Backups a Hashnode blog including the images from the CDN

About This Project

Better-Hashnode-Backups is a Python script that creates local backups of posts from a Hashnode blog. Hashnode provides an official GitHub Action for syncing posts to a repository, but at the time of writing that action does not download images hosted on Hashnode's CDN. This script addresses that gap by copying each post into a target directory and extracting its images, so that a backup remains usable if the original CDN content becomes unavailable.

The script writes each post to its own folder, with the post content saved as index.md and the extracted images stored in an images subfolder. Image detection is restricted to specific file types, and SVG files are excluded by default. The project is configured through an environment file that holds the user's Hashnode API token, and it is intended to be run on a server as a scheduled cron job at a chosen backup frequency.

This project is useful for Hashnode bloggers who want complete, self-contained offline copies of their writing, including the images that the platform's default backup omits. It may also interest developers looking for a simple example of pulling content from a blogging platform's API and mirroring remote assets locally.

Project Details

Tags

backup-scriptbackupshashnode

Explore More Projects