Dagger
Search

static-site

Provider-neutral static-site scenario.

Installation

dagger install github.com/riftonix/daggerverse/scenarios/static-site@v0.4.0

Entrypoint

Return Type
StaticSite !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -Static site source directory
contentSources[Directory ! ] nullExternal content source directories
contentSourcePaths[String ! ] nullPaths selected within content sources
contentTargetPaths[String ! ] nullContent target paths within the site
contentContributors[String ! ] nullContributor names for collision diagnostics
hugoImageRegistryString "ghcr.io"Hugo image registry
hugoImageRepositoryString "riftonix/container-images/hugo-autoprefixer"Hugo image repository
hugoImageTagString "0.165.0-10.5.5"Hugo image tag
hugoContainerUserIdString "65532"Hugo container user
npmRegistryString nullOptional npm registry or proxy URL
Example
dagger -m github.com/riftonix/daggerverse/scenarios/static-site@ca4badf370b32bee437d42fc1771172558945a07 call \
func (m *MyModule) Example() *dagger.StaticSite  {
	return dag.
			Staticsite()
}
@function
def example() -> dagger.StaticSite:
	return (
		dag.static_site()
	)
@func()
example(): StaticSite {
	return dag
		.staticSite()
}

Types

StaticSite 🔗

Static-site scenario entrypoint.

getContentMountCollisions() 🔗

Return content mount path collisions without failing.

Return Type
[String ! ] !
Example
dagger -m github.com/riftonix/daggerverse/scenarios/static-site@ca4badf370b32bee437d42fc1771172558945a07 call \
 get-content-mount-collisions
func (m *MyModule) Example(ctx context.Context) []string  {
	return dag.
			Staticsite().
			Getcontentmountcollisions(ctx)
}
@function
async def example() -> List[str]:
	return await (
		dag.static_site()
		.getcontentmountcollisions()
	)
@func()
async example(): Promise<string[]> {
	return dag
		.staticSite()
		.getContentMountCollisions()
}

module() 🔗

Return the scenario name.

Return Type
String !
Example
dagger -m github.com/riftonix/daggerverse/scenarios/static-site@ca4badf370b32bee437d42fc1771172558945a07 call \
 module
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Staticsite().
			Module(ctx)
}
@function
async def example() -> str:
	return await (
		dag.static_site()
		.module()
	)
@func()
async example(): Promise<string> {
	return dag
		.staticSite()
		.module()
}

renderSite() 🔗

Render a static site with the selected engine.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
siteBaseUrlString !-

Base URL to render the site with

engineString !"hugo"

Static-site engine to use

Example
dagger -m github.com/riftonix/daggerverse/scenarios/static-site@ca4badf370b32bee437d42fc1771172558945a07 call \
 render-site --site-base-url string --engine string
func (m *MyModule) Example(siteBaseUrl string, engine string) *dagger.Directory  {
	return dag.
			Staticsite().
			Rendersite(siteBaseUrl, engine)
}
@function
def example(sitebaseurl: str, engine: str) -> dagger.Directory:
	return (
		dag.static_site()
		.rendersite(sitebaseurl, engine)
	)
@func()
example(siteBaseUrl: string, engine: string): Directory {
	return dag
		.staticSite()
		.renderSite(siteBaseUrl, engine)
}

validateContentMounts() 🔗

Validate that content mounts do not overwrite target paths.

Return Type
String !
Example
dagger -m github.com/riftonix/daggerverse/scenarios/static-site@ca4badf370b32bee437d42fc1771172558945a07 call \
 validate-content-mounts
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Staticsite().
			Validatecontentmounts(ctx)
}
@function
async def example() -> str:
	return await (
		dag.static_site()
		.validatecontentmounts()
	)
@func()
async example(): Promise<string> {
	return dag
		.staticSite()
		.validateContentMounts()
}

verifySite() 🔗

Verify a static site with the selected engine.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
siteBaseUrlString !-

Base URL to render and validate the site with

engineString !"hugo"

Static-site engine to use

Example
dagger -m github.com/riftonix/daggerverse/scenarios/static-site@ca4badf370b32bee437d42fc1771172558945a07 call \
 verify-site --site-base-url string --engine string
func (m *MyModule) Example(ctx context.Context, siteBaseUrl string, engine string) string  {
	return dag.
			Staticsite().
			Verifysite(ctx, siteBaseUrl, engine)
}
@function
async def example(sitebaseurl: str, engine: str) -> str:
	return await (
		dag.static_site()
		.verifysite(sitebaseurl, engine)
	)
@func()
async example(siteBaseUrl: string, engine: string): Promise<string> {
	return dag
		.staticSite()
		.verifySite(siteBaseUrl, engine)
}