Dagger
Search

docusaurus

This module allows you to run docusaurus sites locally with Dagger
without needing to install any additional dependencies.

Example Usage:

`dagger call -m github.com/levlaz/daggerverse/docusaurus serve --dir "/src/docs" --src https://github.com/kpenfound/dagger#kyle/docs-239-convert-secrets` up

The example above shows how to grab a remote git branch, the basic
structure is https://github.com/$USER/$REPO#$BRANCH. The `src` argument can
take a local directory, but this module becomes especially
useful when you pass in remote git repos. In particular, imagine you are trying
to preview a PR for a docs change. You can simply pass in the git branch from
your fork and preview the docs without needing to install any local dependencies
or have to remember how to fetch remote branches locally.

Installation

dagger install github.com/marcosnils/levlaz-daggerverse/docusaurus@ba58c1683fdd7904ec4fb4d3fd99803a2bcc842a

Entrypoint

Return Type
Docusaurus !
Arguments
NameTypeDescription
srcDirectory !The source directory of your docusaurus site, this can be a local directory or a remote git repo
dirString Optional working directory if you need to execute docusaurus commands outside of your root
disableCacheBoolean Optional flag to disable cache
cacheVolumeNameString Optional cache volume name; this is useful if you work with multiple projects or have node_dependencies that are rapidly changing to avoid issues with npm having failures.
Example
dagger -m github.com/marcosnils/levlaz-daggerverse/docusaurus@ba58c1683fdd7904ec4fb4d3fd99803a2bcc842a call \
 --src DIR_PATH
func (m *myModule) example(src *Directory) *Docusaurus  {
	return dag.
			Docusaurus(src)
}
@function
def example(src: dagger.Directory, ) -> dag.Docusaurus:
	return (
		dag.docusaurus(src)
	)
@func()
example(src: Directory, ): Docusaurus {
	return dag
		.docusaurus(src)
}

Types

Docusaurus 🔗

src() 🔗

Return Type
Directory !
Example
dagger -m github.com/marcosnils/levlaz-daggerverse/docusaurus@ba58c1683fdd7904ec4fb4d3fd99803a2bcc842a call \
 --src DIR_PATH src
func (m *myModule) example(src *Directory) *Directory  {
	return dag.
			Docusaurus(src).
			Src()
}
@function
def example(src: dagger.Directory, ) -> dagger.Directory:
	return (
		dag.docusaurus(src)
		.src()
	)
@func()
example(src: Directory, ): Directory {
	return dag
		.docusaurus(src)
		.src()
}

dir() 🔗

Return Type
String !
Example
dagger -m github.com/marcosnils/levlaz-daggerverse/docusaurus@ba58c1683fdd7904ec4fb4d3fd99803a2bcc842a call \
 --src DIR_PATH dir
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Docusaurus(src).
			Dir(ctx)
}
@function
async def example(src: dagger.Directory, ) -> str:
	return await (
		dag.docusaurus(src)
		.dir()
	)
@func()
async example(src: Directory, ): Promise<string> {
	return dag
		.docusaurus(src)
		.dir()
}

disableCache() 🔗

Return Type
Boolean !
Example
dagger -m github.com/marcosnils/levlaz-daggerverse/docusaurus@ba58c1683fdd7904ec4fb4d3fd99803a2bcc842a call \
 --src DIR_PATH disable-cache
func (m *myModule) example(ctx context.Context, src *Directory) bool  {
	return dag.
			Docusaurus(src).
			DisableCache(ctx)
}
@function
async def example(src: dagger.Directory, ) -> bool:
	return await (
		dag.docusaurus(src)
		.disable_cache()
	)
@func()
async example(src: Directory, ): Promise<boolean> {
	return dag
		.docusaurus(src)
		.disableCache()
}

cacheVolumeName() 🔗

Return Type
String !
Example
dagger -m github.com/marcosnils/levlaz-daggerverse/docusaurus@ba58c1683fdd7904ec4fb4d3fd99803a2bcc842a call \
 --src DIR_PATH cache-volume-name
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Docusaurus(src).
			CacheVolumeName(ctx)
}
@function
async def example(src: dagger.Directory, ) -> str:
	return await (
		dag.docusaurus(src)
		.cache_volume_name()
	)
@func()
async example(src: Directory, ): Promise<string> {
	return dag
		.docusaurus(src)
		.cacheVolumeName()
}

base() 🔗

Return base container for running docusaurus with docs mounted and docusaurus dependencies installed.

Return Type
Container !
Example
dagger -m github.com/marcosnils/levlaz-daggerverse/docusaurus@ba58c1683fdd7904ec4fb4d3fd99803a2bcc842a call \
 --src DIR_PATH base
func (m *myModule) example(src *Directory) *Container  {
	return dag.
			Docusaurus(src).
			Base()
}
@function
def example(src: dagger.Directory, ) -> dagger.Container:
	return (
		dag.docusaurus(src)
		.base()
	)
@func()
example(src: Directory, ): Container {
	return dag
		.docusaurus(src)
		.base()
}

build() 🔗

Build production docs

Return Type
Directory !
Example
dagger -m github.com/marcosnils/levlaz-daggerverse/docusaurus@ba58c1683fdd7904ec4fb4d3fd99803a2bcc842a call \
 --src DIR_PATH build
func (m *myModule) example(src *Directory) *Directory  {
	return dag.
			Docusaurus(src).
			Build()
}
@function
def example(src: dagger.Directory, ) -> dagger.Directory:
	return (
		dag.docusaurus(src)
		.build()
	)
@func()
example(src: Directory, ): Directory {
	return dag
		.docusaurus(src)
		.build()
}

serve() 🔗

Serve production docs locally as a service

Return Type
Service !
Example
dagger -m github.com/marcosnils/levlaz-daggerverse/docusaurus@ba58c1683fdd7904ec4fb4d3fd99803a2bcc842a call \
 --src DIR_PATH serve
func (m *myModule) example(src *Directory) *Service  {
	return dag.
			Docusaurus(src).
			Serve()
}
@function
def example(src: dagger.Directory, ) -> dagger.Service:
	return (
		dag.docusaurus(src)
		.serve()
	)
@func()
example(src: Directory, ): Service {
	return dag
		.docusaurus(src)
		.serve()
}

serveDev() 🔗

Build and serve development docs as a service

Return Type
Service !
Example
dagger -m github.com/marcosnils/levlaz-daggerverse/docusaurus@ba58c1683fdd7904ec4fb4d3fd99803a2bcc842a call \
 --src DIR_PATH serve-dev
func (m *myModule) example(src *Directory) *Service  {
	return dag.
			Docusaurus(src).
			ServeDev()
}
@function
def example(src: dagger.Directory, ) -> dagger.Service:
	return (
		dag.docusaurus(src)
		.serve_dev()
	)
@func()
example(src: Directory, ): Service {
	return dag
		.docusaurus(src)
		.serveDev()
}