...
This commit is contained in:
@@ -50,6 +50,21 @@ pub fn (mut s DocSite) build_publish() ! {
|
||||
'
|
||||
retry: 0
|
||||
)!
|
||||
for item in s.website.siteconfig.build_dest {
|
||||
if item.path.trim_space().trim("/ ") == "" {
|
||||
$if debug{
|
||||
print_backtrace()
|
||||
}
|
||||
return error("build destination path is empty for docusaurus.")
|
||||
}
|
||||
osal.exec(
|
||||
cmd: '
|
||||
cd ${s.path_build.path}
|
||||
rsync -avz --delete -e "ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" build/ ${item.path}
|
||||
'
|
||||
)!
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@[params]
|
||||
|
||||
@@ -16,7 +16,7 @@ pub fn dsite_define(sitename string) ! {
|
||||
mut c := config()!
|
||||
|
||||
path_publish := '${c.path_publish.path}/${sitename}'
|
||||
path_build_ := '${c.path_build.path}/${sitename}'
|
||||
path_build_ := '${c.path_build.path}'
|
||||
|
||||
// Get the site object after processing, this is the website which is a generic definition of a site
|
||||
mut website := site.get(name: sitename)!
|
||||
@@ -24,7 +24,7 @@ pub fn dsite_define(sitename string) ! {
|
||||
// Create the DocSite instance
|
||||
mut dsite := &DocSite{
|
||||
name: sitename
|
||||
path_publish: pathlib.get_dir(path: path_publish, create: true)!
|
||||
path_publish: pathlib.get_dir(path: "${path_build_}/build", create: true)!
|
||||
path_build: pathlib.get_dir(path: path_build_, create: true)!
|
||||
config: new_configuration(website.siteconfig)!
|
||||
website: website
|
||||
|
||||
Reference in New Issue
Block a user