Hugo Modules

Configure Hugo modules

Module configuration: top level # hugo. yaml   toml   json   module: noProxy: none noVendor: "" private: '*.*' proxy: direct replacements: "" vendorClosest: false workspace: "off" [module] noProxy = 'none' noVendor = '' private = '*.*' proxy = 'direct' replacements = '' vendorClosest = false workspace = 'off' { "module": { "noProxy": "none", "noVendor": "", "private": "*.*", "proxy": "direct", "replacements": "", "vendorClosest": false, "workspace": "off" } } noProxy (string) Comma separated glob list matching paths that should not use the proxy configured above. ...

Use Hugo Modules

Prerequisite # Initialize a new module # Use hugo mod init to initialize a new Hugo Module. If it fails to guess the module path, you must provide it as an argument, e.g.: hugo mod init github.com/<your_user>/<your_project> Also see the CLI Doc. Use a module for a theme # The easiest way to use a Module for a theme is to import it in the configuration. Initialize the hugo module system: hugo mod init github. ...

Theme components

This section contain information that may be outdated and is in the process of being rewritten. Since Hugo 0.42 a project can configure a theme as a composite of as many theme components you need: hugo. yaml   toml   json   theme: - my-shortcodes - base-theme - hyde theme = ['my-shortcodes', 'base-theme', 'hyde'] { "theme": [ "my-shortcodes", "base-theme", "hyde" ] } You can even nest this, and have the theme component itself include theme components in its own hugo. ...