0.0.6 • Published 3 months ago

@tanglemedia/hugo-functions v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

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 headless
      • flexContentID - 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"
              ) 
          }}
  • Get Media

  • Get Media Path

0.0.6

3 months ago

0.0.5

3 months ago

0.0.4

4 months ago

0.0.3

4 months ago

0.0.2

4 months ago

0.0.1

4 months ago