@tanglemedia/hugo-functions
v0.0.6
Published
Hugo functions that do certains tasks
Readme
Hugo Functions
Contains hugo partials that you can use as functions to do certain tasks
How to install
- In the root of your hugo repo, run
npm i @tanglemedia/hugo-functions - In your site config file
config.{toml,yaml,json}, add the following:
"module": {
"mounts": [
{
"source": "node_modules/@tanglemedia/hugo-functions/layouts",
"target": "layouts"
}
]
}Available Functions
Flex Content Functions
Get Plain
- Description:
- Gets the plain version of a flex content
- Parameters:
flexContentDirPath- Path to the flex content folder relative to the /content. It is assumed that the flex content is headlessflexContentID- ID of the flex content
- Returns
- Plain version of the flexible content
- Example:
{{ partial "pkg/functions/flex-content/get-plain" (dict "flexContentDirPath" "tngl_flex_content" "flexContentID" "1234567890" ) }}
- Description:
Get Media
Get Media Path
