Dagger
Search

hugo

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/riftonix/daggerverse/modules/hugo@v0.4.0

Entrypoint

Return Type
Hugo !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -Hugo site directory
imageRegistryString "ghcr.io"Hugo image registry
imageRepositoryString "riftonix/container-images/hugo-autoprefixer"Hugo image repository
imageTagString "0.165.0-10.5.5"Hugo image tag
userIdString "65532"Hugo image user
npmRegistryString nullOptional npm registry or proxy URL
Example
dagger -m github.com/riftonix/daggerverse/modules/hugo@ca4badf370b32bee437d42fc1771172558945a07 call \
func (m *MyModule) Example() *dagger.Hugo  {
	return dag.
			Hugo()
}
@function
def example() -> dagger.Hugo:
	return (
		dag.hugo()
	)
@func()
example(): Hugo {
	return dag
		.hugo()
}

Types

Hugo 🔗

build() 🔗

Build Hugo site and return the public directory

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
siteBaseUrlString !-

Site base URL for Hugo

Example
dagger -m github.com/riftonix/daggerverse/modules/hugo@ca4badf370b32bee437d42fc1771172558945a07 call \
 build --site-base-url string
func (m *MyModule) Example(siteBaseUrl string) *dagger.Directory  {
	return dag.
			Hugo().
			Build(siteBaseUrl)
}
@function
def example(sitebaseurl: str) -> dagger.Directory:
	return (
		dag.hugo()
		.build(sitebaseurl)
	)
@func()
example(siteBaseUrl: string): Directory {
	return dag
		.hugo()
		.build(siteBaseUrl)
}

container() 🔗

Creates container with configured Hugo

Return Type
Container !
Example
dagger -m github.com/riftonix/daggerverse/modules/hugo@ca4badf370b32bee437d42fc1771172558945a07 call \
 container
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Hugo().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.hugo()
		.container()
	)
@func()
example(): Container {
	return dag
		.hugo()
		.container()
}

validate() 🔗

Validate Hugo site configuration and strict rendering.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
siteBaseUrlString !-

Site base URL for Hugo

Example
dagger -m github.com/riftonix/daggerverse/modules/hugo@ca4badf370b32bee437d42fc1771172558945a07 call \
 validate --site-base-url string
func (m *MyModule) Example(ctx context.Context, siteBaseUrl string) string  {
	return dag.
			Hugo().
			Validate(ctx, siteBaseUrl)
}
@function
async def example(sitebaseurl: str) -> str:
	return await (
		dag.hugo()
		.validate(sitebaseurl)
	)
@func()
async example(siteBaseUrl: string): Promise<string> {
	return dag
		.hugo()
		.validate(siteBaseUrl)
}

withNpmDependencies() 🔗

Return the runtime after optional lockfile-pinned npm installation.

Return Type
Container !
Example
dagger -m github.com/riftonix/daggerverse/modules/hugo@ca4badf370b32bee437d42fc1771172558945a07 call \
 with-npm-dependencies
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Hugo().
			Withnpmdependencies()
}
@function
def example() -> dagger.Container:
	return (
		dag.hugo()
		.withnpmdependencies()
	)
@func()
example(): Container {
	return dag
		.hugo()
		.withNpmDependencies()
}