This commit is contained in:
2025-08-08 09:25:56 +02:00
parent edefab866f
commit aa26ae60e2
2 changed files with 19 additions and 8 deletions

View File

@@ -7,9 +7,9 @@ playcmds.run(
!!docusaurus.define
path_build: "/tmp/docusaurus_build"
path_publish: "/tmp/docusaurus_publish"
reset: 1
install: 1
template_update: 1
// reset: 1
// install: 1
// template_update: 1
!!docusaurus.add sitename:"tfgrid_tech"
git_url:"https://git.threefold.info/tfgrid/docs_tfgrid4/src/branch/main/ebooks/tech"
@@ -20,6 +20,6 @@ playcmds.run(
!!docusaurus.build
!!docusaurus.dev site:"tfgrid_tech" open:true watch_changes:true
// !!docusaurus.dev site:"tfgrid_tech" open:true
'
)!

View File

@@ -113,6 +113,15 @@ pub fn cmd_docusaurus(mut cmdroot Command) Command {
description: 'create a new docusaurus site.'
})
cmd_run.add_flag(Flag{
flag: .bool
required: false
name: 'reset'
abbrev: 'r'
description: 'reset the docusaurus building process, reinstall all.'
})
cmdroot.add_command(cmd_run)
return cmdroot
}
@@ -122,6 +131,8 @@ fn cmd_docusaurus_execute(cmd Command) ! {
mut buildpublish := cmd.flags.get_bool('buildpublish') or { false }
mut builddevpublish := cmd.flags.get_bool('builddevpublish') or { false }
mut dev := cmd.flags.get_bool('dev') or { false }
mut new := cmd.flags.get_bool('new') or { false }
mut reset := cmd.flags.get_bool('reset') or { false }
// --- Build Path Logic ---
mut build_path := cmd.flags.get_string('buildpath') or { '' }
@@ -168,9 +179,9 @@ fn cmd_docusaurus_execute(cmd Command) ! {
// Set up the docusaurus factory
docusaurus.factory_set(
path_build: build_path
reset: true
install: true
template_update: true
reset: reset
install: reset
template_update: reset
)!
// Add the docusaurus site
@@ -188,7 +199,7 @@ fn cmd_docusaurus_execute(cmd Command) ! {
} else if dev {
dsite.dev(
open: open
watch_changes: true
watch_changes: false
)!
} else {
dsite.build()!