View Source LastCrusader.Micropub.Hugo (Last Crusader v0.11.0)

Generates Hugo compatible data, file content, file name

Summary

Functions

Renders the post date into Hugo's expected date format (ISO 8601)

Generates TOML formatted front-matter

Generates the complete filename (with path) for a Hugo website

Create a new Hugo document

Retrieves the local file path of a post from its published public URL

Retrieves the local directory path of a post from its published public URL

Types

path()

@type path() :: String.t()

url()

@type url() :: String.t()

Functions

convert_date_to_hugo_format(date)

@spec convert_date_to_hugo_format(DateTime.t()) :: BitString.t()

Renders the post date into Hugo's expected date format (ISO 8601)

generate_front_matter(date, type, data \\ %{})

Generates TOML formatted front-matter

generate_path(arg1, name, date)

Generates the complete filename (with path) for a Hugo website

Parameters:

  • type: can be :note :post :bookmark in_reply_to
  • name: for the file name
  • date

new(type, date, data)

Create a new Hugo document

reverse_url(post_url, host)

@spec reverse_url(url(), url()) :: String.t()

Retrieves the local file path of a post from its published public URL

reverse_url_root(post_url, host)

@spec reverse_url_root(url(), url()) :: String.t()

Retrieves the local directory path of a post from its published public URL