Module Content_types

Content types for the Memoir static site generator.

module Date : sig ... end

A calendar date parsed from an ISO "YYYY-MM-DD" frontmatter string.

type frontmatter = {
  1. title : string;
  2. description : string option;
  3. date : Date.t option;
  4. updated : Date.t option;
  5. tags : string list;
  6. draft : bool;
  7. layout : string option;
  8. slug : string option;
  9. author : string option;
  10. featured_image : string option;
}

Frontmatter metadata for content pages.

val empty_frontmatter : frontmatter

Empty frontmatter. A title = "" result signals "no frontmatter block at all"; a present-but-titleless block yields the "Untitled" default.

type content_page = {
  1. path : string;
    (*

    File path relative to the content directory.

    *)
  2. frontmatter : frontmatter;
  3. content : string;
    (*

    Markdown content.

    *)
  4. html_content : string option;
    (*

    Generated HTML content, if rendered.

    *)
  5. url_path : string;
    (*

    URL path for the generated page.

    *)
}

A content page with frontmatter and (optionally rendered) markdown content.

type content_type =
  1. | Page
  2. | Post
  3. | Project
  4. | Journal
  5. | Asset
    (*

    Non-markdown file copied through verbatim.

    *)

The section a content file belongs to.