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/hugo@v0.1.0Entrypoint
Return Type
Hugo !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Hugo site directory |
| imageRegistry | String | "docker.io" | Hugo image registry |
| imageRepository | String | "hugomods/hugo" | Hugo image repository |
| imageTag | String | "exts-0.154.2" | Hugo image tag |
| containerUser | String | "65532" | Hugo image user |
Example
dagger -m github.com/riftonix/daggerverse/hugo@6f539246de558fd5a61f61b997fcd48660e8f54e 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 |
|---|---|---|---|
| hugoThemeUrl | String ! | - | Hugo theme module URL |
| siteBaseUrl | String ! | - | Site base URL for Hugo |
| npmRegistryUrl | String ! | "https://registry.npmjs.org/" | NPM registry URL |
Example
dagger -m github.com/riftonix/daggerverse/hugo@6f539246de558fd5a61f61b997fcd48660e8f54e call \
build --hugo-theme-url string --site-base-url string --npm-registry-url stringfunc (m *MyModule) Example(hugoThemeUrl string, siteBaseUrl string, npmRegistryUrl string) *dagger.Directory {
return dag.
Hugo().
Build(hugoThemeUrl, siteBaseUrl, npmRegistryUrl)
}@function
def example(hugo_theme_url: str, site_base_url: str, npm_registry_url: str) -> dagger.Directory:
return (
dag.hugo()
.build(hugo_theme_url, site_base_url, npm_registry_url)
)@func()
example(hugoThemeUrl: string, siteBaseUrl: string, npmRegistryUrl: string): Directory {
return dag
.hugo()
.build(hugoThemeUrl, siteBaseUrl, npmRegistryUrl)
}container() 🔗
Creates container with configured Hugo
Return Type
Container ! Example
dagger -m github.com/riftonix/daggerverse/hugo@6f539246de558fd5a61f61b997fcd48660e8f54e 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()
}