modules

package
v0.152.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

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

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) *