@alvincrespo/hashnode-content-converter - v0.2.2
    Preparing search index...

    Getting Started

    This guide walks you through installing and using the Hashnode Content Converter.

    • Node.js >= 18.0.0
    • A Hashnode export JSON file
    1. Go to your Hashnode dashboard
    2. Navigate to Settings > Export
    3. Click Export to download your blog data as JSON
    4. Save the file (e.g., hashnode-export.json)
    npm install -g @alvincrespo/hashnode-content-converter
    
    npm install @alvincrespo/hashnode-content-converter
    

    After global installation:

    hashnode-converter convert \
    --export ./hashnode-export.json \
    --output ./blog/posts

    Or with npx:

    npx @alvincrespo/hashnode-content-converter convert \
    --export ./hashnode-export.json \
    --output ./blog/posts
    import { Converter } from '@alvincrespo/hashnode-content-converter';

    // Simple one-liner
    const result = await Converter.fromExportFile('./export.json', './blog');

    console.log(`Converted: ${result.converted}`);
    console.log(`Skipped: ${result.skipped}`);
    console.log(`Errors: ${result.errors}`);

    After conversion, your output directory will contain:

    blog/
    ├── my-first-post/
    │ ├── index.md # Converted markdown with frontmatter
    │ └── images/ # Downloaded images
    │ ├── hero.png
    │ └── screenshot.jpg
    ├── another-post/
    │ ├── index.md
    │ └── images/
    └── ...

    Each converted file includes YAML frontmatter:

    ---
    title: "My First Post"
    slug: "my-first-post"
    date: "2024-01-15T10:30:00.000Z"
    tags:
    - javascript
    - tutorial
    coverImage: "./images/hero.png"
    ---

    Your markdown content here...