diff --git a/examples/web/docusaurus_example.vsh b/examples/web/docusaurus_example.vsh index 1a01effe..690a5ec8 100755 --- a/examples/web/docusaurus_example.vsh +++ b/examples/web/docusaurus_example.vsh @@ -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 ' )! diff --git a/lib/core/herocmds/docusaurus.v b/lib/core/herocmds/docusaurus.v index 3705cbd4..6b0014a7 100644 --- a/lib/core/herocmds/docusaurus.v +++ b/lib/core/herocmds/docusaurus.v @@ -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()!