Hwaro::Services::Importers::HugoImporter
Inherits Hwaro::Services::Importers::Base < Reference < Object
Constants
LOCAL_DATETIME_LINE_RE = /\A[ \t]*([A-Za-z0-9_-]+)[ \t]*=[ \t]*\d{4}-\d{2}-\d{2}[Tt ]\d{2}:\d{2}:\d{2}(?:\.\d+)?[ \t]*(?:#.*)?\z/
A top-level TOML key assigned a local date-time: date and time,
no Z or offset (optionally followed by a comment).
MAPPED_KEYS = Set {"title", "date", "publishdate", "lastmod", "draft", "description", "summary", "tags", "categories", "authors", "series", "weight", "slug", "aliases", "url", "images", "featured_image", "expirydate", "layout"}
Keys process_file maps explicitly (lowercase).
TOML_FM_REGEX = /\A\+\+\+[ \t]*\n(.*?\n?)^\+\+\+[ \t]*$\n?(.*)\z/m
Regex for TOML frontmatter: +++ on first line, +++ on its own line. (YAML frontmatter reuses the inherited Base::YAML_FM_REGEX.)
Instance methods
run(options : Config::Options::ImportOptions) : ImportResult
Source