2.0.0 • Published 5 years ago

smart-markdown-loader v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Smart Markdown Loader

  • Extracts front-matter & metadata
  • Resolves images
  • Emits markdown file as a URL

Defining Metadata

You can supply metadata by placing the following pattern at the top of your markdown file.

###### meta start

key: value
key: value
key: value
...

###### meta end

Loader Options

PropertyTypeRequiredDescription
publicPathstringPublic path of the root of the site.
outputPathstringDirectory to emit the files in the output path.

Emitted Interface

export interface MarkdownResolveData {
    /**
     * URL to the markdown file.
     */
    url: string;

    /**
     * Meta/Front-matter data from the markdown file.
     */
    meta: Record<string, string>;
}