From 682abdbda91a8ded4d3fae44d9323a98b510cc28 Mon Sep 17 00:00:00 2001 From: despiegk Date: Fri, 8 Aug 2025 15:53:25 +0200 Subject: [PATCH] ... --- lib/web/docusaurus/dsite_generate.v | 34 +++++++++++++++++++++++++++++ test_basic.vsh | 1 + 2 files changed, 35 insertions(+) diff --git a/lib/web/docusaurus/dsite_generate.v b/lib/web/docusaurus/dsite_generate.v index 55f8c414..dbaa6130 100644 --- a/lib/web/docusaurus/dsite_generate.v +++ b/lib/web/docusaurus/dsite_generate.v @@ -161,4 +161,38 @@ export default function Home() { path: docs_path site: updated_site )! + + site.process_imports()! +} + + + +pub fn (mut site DocSite) process_imports() ! { + mut gs := gittools.new()! + mut f:=factory_get()! + + for item in site.siteconfig.imports { + mypath := gs.get_path( + pull: false + reset: false + url: item.url + )! + mut mypatho := pathlib.get(mypath) + + mypatho.copy(dest: '${f.path_build.path}/docs/${item.dest}', delete: true)! + + // println(item) + // replace: {'NAME': 'MyName', 'URGENCY': 'red'} + mut ri := regext.regex_instructions_new() + for key, val in item.replace { + ri.add_item('\{${key}\}', val)! + } + mypatho.copy(dest: '${f.path_build.path}/docs/${item.dest}', delete: true)! + ri.replace_in_dir( + path: '${f.path_build.path}/docs/${item.dest}' + extensions: [ + 'md', + ] + )! + } } diff --git a/test_basic.vsh b/test_basic.vsh index e057683a..94cc3483 100755 --- a/test_basic.vsh +++ b/test_basic.vsh @@ -184,6 +184,7 @@ data/radixtree clients/livekit core/playcmds doctree/ +jina/ ' if in_github_actions() {