hugo
This module has been generated via dagger init and serves as a reference tobasic 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@d3057aca955cfebb523f281990c6d79804289279Entrypoint
Return Type
Hugo !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Hugo site directory |
| imageRegistry | String | "ghcr.io" | Hugo image registry |
| imageRepository | String | "riftonix/container-images/hugo-autoprefixer" | Hugo image repository |
| imageTag | String | "0.165.0-10.6.2" | Hugo image tag |
| userId | String | "65532" | Hugo image user |
| npmRegistry | String | null | Optional npm registry or proxy URL |
Example
dagger -m github.com/riftonix/daggerverse/modules/hugo@d3057aca955cfebb523f281990c6d79804289279 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
| Name | Type | Default Value | Description |
|---|---|---|---|
| siteBaseUrl | String ! | - | Site base URL for Hugo |
Example
dagger -m github.com/riftonix/daggerverse/modules/hugo@d3057aca955cfebb523f281990c6d79804289279 call \
build --site-base-url stringfunc (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@d3057aca955cfebb523f281990c6d79804289279 call \
containerfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| siteBaseUrl | String ! | - | Site base URL for Hugo |
Example
dagger -m github.com/riftonix/daggerverse/modules/hugo@d3057aca955cfebb523f281990c6d79804289279 call \
validate --site-base-url stringfunc (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@d3057aca955cfebb523f281990c6d79804289279 call \
with-npm-dependenciesfunc (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()
}