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

Functions

Link to this function

convert_date_to_hugo_format(date)

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

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

Link to this function

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

View Source

Generates TOML formatted front-matter

Link to this function

generate_path(arg1, name, date)

View Source

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

Create a new Hugo document

Link to this function

reverse_url(post_url, host)

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

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

Link to this function

reverse_url_root(post_url, host)

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

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