HugoMarkdownDocsExporter

Inherits: MarkdownDocsExporter > JsonIO > Reference > Object

Description

Exports md files configured to work with Hugo. It’s supposed to work with any theme, but it was only tested with hugo-theme-learn. It’s recommended to export the whole reference into a folder inside the “content” folder of your hugo site, but not directly in content, without any subfolder.

In addition to that, if you use @category, a subfolder with it’s own _index.md will be created for each category. You can order them and add descriptions to this pages in the Docs Exporter tab in the Project Settings.

Properties

type property default value
String author "eh-jogos"
bool should_create_toc_on_category_pages Null

Methods

return type method signature
null export_hugo_site_pages(String reference_json_path, String export_path)

Constants

  • HUGO_CHAPTER_FRONT_MATTER = “— title: {title} author: {author} date: {datetime} weight: {weight} — “ — Front matter that will be used for category pages.
  • HUGO_DEFAULT_FRONT_MATTER = “— title: {title} author: {author} date: {datetime} weight: 1 — “ — Front matter that will be used to default pages.

Properties Descriptions

author

Default "eh-jogos"

Author to be used across the site’s front matters.


should_create_toc_on_category_pages

  • bool should_create_toc_on_category_pages

Enables / Disables table of contents in category pages.


Method Descriptions

export_hugo_site_pages

  • void export_hugo_site_pages(String reference_json_path, String export_path)

Takes in the reference json file path and an export path and generates and exports hugo formatted .md files.