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

    Interface PostMetadata

    Cleaned and validated metadata extracted from a Hashnode post.

    This interface represents the subset of HashnodePost fields that are used in the conversion pipeline. The PostParser extracts and validates these fields from raw Hashnode posts.

    import { PostParser } from '@alvincrespo/hashnode-content-converter';

    const parser = new PostParser();
    const metadata: PostMetadata = parser.parse(hashnodePost);

    console.log(metadata.title); // Post title
    console.log(metadata.slug); // URL-friendly slug
    console.log(metadata.tags); // ['javascript', 'tutorial']
    interface PostMetadata {
        brief: string;
        contentMarkdown: string;
        coverImage?: string;
        dateAdded: string;
        slug: string;
        tags?: string[];
        title: string;
    }
    Index

    Properties

    brief: string

    Post excerpt/description (may be empty string)

    contentMarkdown: string

    Raw markdown content (trimmed, non-empty)

    coverImage?: string

    Optional cover image URL (undefined if not present)

    dateAdded: string

    Validated ISO 8601 date string

    slug: string

    Validated URL-friendly slug (trimmed, non-empty)

    tags?: string[]

    Optional array of validated tag strings (undefined if no valid tags)

    title: string

    Validated post title (trimmed, non-empty)