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 run --dir "/src/docs" --src https://github.com/kpenfound/dagger#kyle/docs-239-convert-secrets as-service up`

The example above shows how to grab a rempote git branch, the basic structure is https://github.com/$USER/$REPO#$BRANCH. The `src` argument can take a local directory, but this module becomes esepecially 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 depencies or have to remember how to fetch remote branches locally.

Since our run function returns a dagger `Container` type, we can run it as a service by chaining `as-service up` to the end of our invokation.

Installation

dagger install github.com/levlaz/daggerverse/docusaurus@v0.1.2

Entrypoint

Return Type
Docusaurus
Example
dagger -m github.com/levlaz/daggerverse/docusaurus@73ae8f293582369292d7119672eae1ae2a38a790 call \
func (m *myModule) example() *Docusaurus  {
	return dag.
			Docusaurus()
}
@function
def example() -> dag.Docusaurus:
	return (
		dag.docusaurus()
	)
@func()
example(): Docusaurus {
	return dag
		.docusaurus()
}

Types

Docusaurus 🔗

run() 🔗

Run docs site locally

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-The source directory of your docusaurus site, this can be a local directory or a remote git repo
dirString !"/src"Optional working directory if you need to execute docusaurus commands outside of your root
Example
dagger -m github.com/levlaz/daggerverse/docusaurus@73ae8f293582369292d7119672eae1ae2a38a790 call \
 run --src DIR_PATH --dir string
func (m *myModule) example(src *Directory, dir string) *Container  {
	return dag.
			Docusaurus().
			Run(src, dir)
}
@function
def example(src: dagger.Directory, dir: str) -> dagger.Container:
	return (
		dag.docusaurus()
		.run(src, dir)
	)
@func()
example(src: Directory, dir: string): Container {
	return dag
		.docusaurus()
		.run(src, dir)
}