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

    Interface HashnodePost

    Represents a single blog post from a Hashnode export.

    This interface defines the structure of post data exported from Hashnode. Not all fields are used during conversion - see PostMetadata for the extracted subset used in the conversion pipeline.

    const post: HashnodePost = {
    _id: "507f1f77bcf86cd799439011",
    id: "507f1f77bcf86cd799439011",
    cuid: "ckl3s0f8c0001ia9o9v3s3p3s",
    slug: "my-first-post",
    title: "My First Post",
    dateAdded: "2024-01-15T10:30:00.000Z",
    createdAt: "2024-01-15T10:30:00.000Z",
    updatedAt: "2024-01-16T12:00:00.000Z",
    contentMarkdown: "# Hello World\n\nThis is my post.",
    content: "<h1>Hello World</h1><p>This is my post.</p>",
    brief: "A brief introduction to my blog",
    coverImage: "https://cdn.hashnode.com/res/hashnode/image/upload/...",
    views: 100,
    author: "author-id",
    tags: ["javascript", "tutorial"],
    isActive: true
    };
    interface HashnodePost {
        _id: string;
        author: string;
        brief: string;
        content: string;
        contentMarkdown: string;
        coverImage?: string;
        createdAt: string;
        cuid: string;
        dateAdded: string;
        id: string;
        isActive: boolean;
        slug: string;
        tags: string[];
        title: string;
        updatedAt: string;
        views: number;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

      Allow additional unknown fields from Hashnode export

    Index

    Properties

    _id: string

    MongoDB ObjectId for the post

    author: string

    Author identifier

    brief: string

    Short description or excerpt of the post

    content: string

    Rendered HTML content of the post (not used in conversion)

    contentMarkdown: string

    Raw markdown content of the post (used for conversion)

    coverImage?: string

    Optional URL to the post's cover image

    createdAt: string

    ISO 8601 date string when the post was created

    cuid: string

    Hashnode's unique identifier (collision-resistant unique ID)

    dateAdded: string

    ISO 8601 date string when the post was published

    id: string

    Post identifier (same as _id)

    isActive: boolean

    Whether the post is currently published

    slug: string

    URL-friendly slug for the post

    tags: string[]

    Array of tag names associated with the post

    title: string

    Post title

    updatedAt: string

    ISO 8601 date string when the post was last updated

    views: number

    Number of views the post has received