refactor: Centralize Docusaurus site processing logic

- Add central `process_site_from_path` function
- Recursively process heroscript files in `cfg` directory
- Remove duplicated site processing from `run` and `add` commands
- Respect `play` parameter from heroscript `define` block
This commit is contained in:
Mahmoud-Emad
2025-08-07 16:22:35 +03:00
parent 843b20804b
commit b01e6a5a4c
4 changed files with 86 additions and 49 deletions

View File

@@ -4,11 +4,6 @@ import freeflowuniverse.herolib.core.playcmds
playcmds.run(
heroscript: '
!!docusaurus.config
name: "tfgrid_tech"
title: "TFGrid Tech Docs"
!!docusaurus.define
path_build: "/tmp/docusaurus_build"
path_publish: "/tmp/docusaurus_publish"
@@ -21,6 +16,7 @@ playcmds.run(
git_root:"/tmp/code"
git_reset:1
git_pull:1
play:true
!!docusaurus.build