atlas back
This commit is contained in:
@@ -17,7 +17,9 @@ pub mut:
|
||||
reset bool
|
||||
template_update bool
|
||||
coderoot string
|
||||
doctree_dir string
|
||||
// Client configuration
|
||||
use_atlas bool // true = atlas_client, false = doctreeclient
|
||||
atlas_dir string // Required when use_atlas = true
|
||||
}
|
||||
|
||||
@[params]
|
||||
@@ -29,7 +31,9 @@ pub mut:
|
||||
reset bool
|
||||
template_update bool
|
||||
coderoot string
|
||||
doctree_dir string
|
||||
// Client configuration
|
||||
use_atlas bool // true = atlas_client, false = doctreeclient
|
||||
atlas_dir string // Required when use_atlas = true
|
||||
}
|
||||
|
||||
// return the last know config
|
||||
@@ -38,8 +42,8 @@ pub fn config() !DocusaurusConfig {
|
||||
docusaurus_config << DocusaurusConfigParams{}
|
||||
}
|
||||
mut args := docusaurus_config[0] or { panic('bug in docusaurus config') }
|
||||
if args.doctree_dir == '' {
|
||||
return error('doctree_dir is not set')
|
||||
if args.use_atlas && args.atlas_dir == '' {
|
||||
return error('use_atlas is true but atlas_dir is not set')
|
||||
}
|
||||
if args.path_build == '' {
|
||||
args.path_build = '${os.home_dir()}/hero/var/docusaurus/build'
|
||||
@@ -58,7 +62,8 @@ pub fn config() !DocusaurusConfig {
|
||||
install: args.install
|
||||
reset: args.reset
|
||||
template_update: args.template_update
|
||||
doctree_dir: args.doctree_dir
|
||||
use_atlas: args.use_atlas
|
||||
atlas_dir: args.atlas_dir
|
||||
}
|
||||
if c.install {
|
||||
install(c)!
|
||||
|
||||
Reference in New Issue
Block a user