Documentation
¶
Overview ¶
Package modules provides a client that can be used to manage Hugo Components, what's referred to as Hugo Modules. Hugo Modules is built on top of Go Modules, but also supports vendoring and components stored directly in the themes dir.
Index ¶
- Constants
- Variables
- func ApplyProjectConfigDefaults(mod Module, cfgs ...config.AllProvider) error
- type Client
- func (c *Client) Clean(pattern string) error
- func (h *Client) Collect() (ModulesConfig, error)
- func (c *Client) Get(args ...string) error
- func (c *Client) Graph(w io.Writer) error
- func (c *Client) Init(path string) error
- func (c *Client) Tidy() error
- func (c *Client) Vendor() error
- func (c *Client) Verify(clean bool) error
- type ClientConfig
- type Config
- type HugoVersion
- type Import
- type Module
- type Modules
- type ModulesConfig
- type Mount
Constants ¶
View Source
const WorkspaceDisabled = "off"
Variables ¶
View Source
var DefaultModuleConfig = Config{ Proxy: "direct", NoProxy: "none", Private: "*.*", Workspace: WorkspaceDisabled, Replacements: nil, }
View Source
var ErrNotExist = errors.New("module does not exist")
Functions ¶
func ApplyProjectConfigDefaults ¶
func ApplyProjectConfigDefaults(mod Module, cfgs ...config.AllProvider) error
ApplyProjectConfigDefaults applies default/missing module configuration for the main project.
Types ¶
type Client ¶
type Client struct {
// Set when Go modules are initialized in the current repo, that is:
// a go.mod file exists.
GoModulesFilename string
// contains filtered or unexported fields
}
Client contains most of the API provided by this package.
func NewClient ¶
func NewClient(cfg ClientConfig) *