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`

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/levlaz/daggerverse/docusaurus@v0.2.1

Entrypoint

Return Type
Docusaurus
Example
dagger -m github.com/levlaz/daggerverse/docusaurus@fd9455d5e8de40ecbc199573920d94a02c38f52f 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 🔗

build() 🔗

Return container for running docusaurus with docs mounted.

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@fd9455d5e8de40ecbc199573920d94a02c38f52f call \
 build --src DIR_PATH --dir string
func (m *myModule) example(src *Directory, dir string) *Container  {
	return dag.
			Docusaurus().
			Build(src, dir)
}
@function
def example(src: dagger.Directory, dir: str) -> dagger.Container:
	return (
		dag.docusaurus()
		.build(src, dir)
	)
@func()
example(src: Directory, dir: string): Container {
	return dag
		.docusaurus()
		.build(src, dir)
}

serve() 🔗

Run docs site locally

Return Type
Scalar !
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@fd9455d5e8de40ecbc199573920d94a02c38f52f call \
 serve --src DIR_PATH --dir string
func (m *myModule) example(src *Directory, dir string)   {
	return dag.
			Docusaurus().
			Serve(src, dir)
}
@function
def example(src: dagger.Directory, dir: str) -> :
	return (
		dag.docusaurus()
		.serve(src, dir)
	)
@func()
example(src: Directory, dir: string):  {
	return dag
		.docusaurus()
		.serve(src, dir)
}