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 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.

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 invocation.

Installation

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

Entrypoint

Return Type
Docusaurus
Example
dagger -m github.com/levlaz/daggerverse/docusaurus@707f8e9911dc3bd857db3d7d6dda91280535885d 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@707f8e9911dc3bd857db3d7d6dda91280535885d 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)
}