fix: Rename freeflowuniverse to incubaid
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
module docusaurus
|
||||
|
||||
import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import incubaid.herolib.core.pathlib
|
||||
|
||||
__global (
|
||||
docusaurus_sites map[string]&DocSite
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
module docusaurus
|
||||
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.web.site { Site, SiteConfig }
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.web.site
|
||||
import incubaid.herolib.osal.core as osal
|
||||
import incubaid.herolib.ui.console
|
||||
|
||||
@[heap]
|
||||
pub struct DocSite {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module docusaurus
|
||||
|
||||
import freeflowuniverse.herolib.web.site
|
||||
import incubaid.herolib.web.site
|
||||
|
||||
// IS THE ONE AS USED BY DOCUSAURUS
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
module docusaurus
|
||||
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import incubaid.herolib.core.pathlib
|
||||
import json
|
||||
import os
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.osal.core as osal
|
||||
import incubaid.herolib.ui.console
|
||||
|
||||
pub fn (mut docsite DocSite) generate() ! {
|
||||
if docsite.generated {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
module docusaurus
|
||||
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.web.doctreeclient
|
||||
import freeflowuniverse.herolib.web.site { Page, Section, Site }
|
||||
import freeflowuniverse.herolib.data.markdown.tools as markdowntools
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.web.doctreeclient
|
||||
import incubaid.herolib.web.site { Page, Section, Site }
|
||||
import incubaid.herolib.data.markdown.tools as markdowntools
|
||||
import incubaid.herolib.ui.console
|
||||
|
||||
// THIS CODE GENERATES A DOCUSAURUS SITE FROM A DOCTREECLIENT AND SITE DEFINITION
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
module docusaurus
|
||||
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import incubaid.herolib.develop.gittools
|
||||
import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools.regext
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.ui.console
|
||||
import incubaid.herolib.core.texttools.regext
|
||||
|
||||
pub fn (mut docsite DocSite) import() ! {
|
||||
for importparams in docsite.website.siteconfig.imports {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
module docusaurus
|
||||
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import incubaid.herolib.core.base
|
||||
import incubaid.herolib.core.texttools
|
||||
|
||||
// Store the Docusaurus site structure in Redis for link processing
|
||||
// This maps collection:page to their actual Docusaurus paths
|
||||
pub fn (mut docsite DocSite) store_site_structure() ! {
|
||||
mut context := base.context()!
|
||||
mut redis := context.redis()!
|
||||
|
||||
|
||||
// Store mapping of collection:page to docusaurus path (without .md extension)
|
||||
for page in docsite.website.pages {
|
||||
parts := page.src.split(':')
|
||||
@@ -17,22 +17,22 @@ pub fn (mut docsite DocSite) store_site_structure() ! {
|
||||
}
|
||||
collection_name := texttools.name_fix(parts[0])
|
||||
page_name := texttools.name_fix(parts[1])
|
||||
|
||||
|
||||
// Calculate the docusaurus path (without .md extension for URLs)
|
||||
mut doc_path := page.path
|
||||
|
||||
|
||||
// Handle empty or root path
|
||||
if doc_path.trim_space() == '' || doc_path == '/' {
|
||||
doc_path = page_name
|
||||
} else if doc_path.ends_with('/') {
|
||||
doc_path += page_name
|
||||
}
|
||||
|
||||
|
||||
// Remove .md extension if present for URL paths
|
||||
if doc_path.ends_with('.md') {
|
||||
doc_path = doc_path[..doc_path.len - 3]
|
||||
}
|
||||
|
||||
|
||||
// Store in Redis with key format: collection:page.md
|
||||
key := '${collection_name}:${page_name}.md'
|
||||
redis.hset('doctree_docusaurus_paths', key, doc_path)!
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
module docusaurus
|
||||
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.web.site
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.core.texttools
|
||||
import incubaid.herolib.web.site
|
||||
import incubaid.herolib.ui.console
|
||||
|
||||
@[params]
|
||||
pub struct AddArgs {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
module docusaurus
|
||||
|
||||
import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.installers.web.bun
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.develop.gittools
|
||||
import incubaid.herolib.osal.core as osal
|
||||
import incubaid.herolib.installers.web.bun
|
||||
|
||||
fn install(c DocusaurusConfig) ! {
|
||||
mut gs := gittools.new()!
|
||||
@@ -17,7 +17,7 @@ fn install(c DocusaurusConfig) ! {
|
||||
template_path := gs.get_path(
|
||||
pull: c.template_update
|
||||
reset: c.reset
|
||||
url: 'https://github.com/freeflowuniverse/docusaurus_template/src/branch/main/template'
|
||||
url: 'https://github.com/incubaid/docusaurus_template/src/branch/main/template'
|
||||
)!
|
||||
|
||||
mut template_path0 := pathlib.get_dir(path: template_path, create: false)!
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module docusaurus
|
||||
|
||||
import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core.base // For context and Redis, if test needs to manage it
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.core.base // For context and Redis, if test needs to manage it
|
||||
import time
|
||||
|
||||
const test_heroscript_content = '!!site.config\n name:"Kristof"\n title:"Internet Geek"\n tagline:"Internet Geek"\n url:"https://friends.threefold.info"\n url_home:"docs/"\n base_url:"/kristof/"\n favicon:"img/favicon.png"\n image:"img/tf_graph.png"\n copyright:"Kristof"\n\n!!site.config_meta\n description:"ThreeFold is laying the foundation for a geo aware Web 4, the next generation of the Internet."\n image:"https://threefold.info/kristof/img/tf_graph.png"\n title:"ThreeFold Technology Vision"\n\n!!site.build_dest\n ssh_name:"production"\n path:"/root/hero/www/info/kristof"\n\n!!site.navbar\n title:"Kristof = Chief Executive Geek"\n logo_alt:"Kristof Logo"\n logo_src:"img/logo.svg"\n logo_src_dark:"img/logo.svg"\n\n!!site.navbar_item\n label:"ThreeFold Technology"\n href:"https://threefold.info/kristof/"\n position:"right"\n\n!!site.navbar_item\n label:"ThreeFold.io"\n href:"https://threefold.io"\n position:"right"\n\n!!site.footer\n style:"dark"\n\n!!site.footer_item\n title:"Docs"\n label:"Introduction"\n href:"/docs"\n\n!!site.footer_item\n title:"Docs"\n label:"TFGrid V4 Docs"\n href:"https://docs.threefold.io/"\n\n!!site.footer_item\n title:"Community"\n label:"Telegram"\n href:"https://t.me/threefold"\n\n!!site.footer_item\n title:"Community"\n label:"X"\n href:"https://x.com/threefold_io"\n\n!!site.footer_item\n title:"Links"\n label:"ThreeFold.io"\n href:"https://threefold.io"\n'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module docusaurus
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
||||
import freeflowuniverse.herolib.web.site
|
||||
import incubaid.herolib.core.playbook { PlayBook }
|
||||
import incubaid.herolib.web.site
|
||||
import os
|
||||
|
||||
pub fn play(mut plbook PlayBook) ! {
|
||||
|
||||
@@ -2,7 +2,7 @@ module docusaurus
|
||||
|
||||
// not longer working because is coming from doctree
|
||||
|
||||
// import freeflowuniverse.herolib.osal.notifier
|
||||
// import incubaid.herolib.osal.notifier
|
||||
// import os
|
||||
|
||||
// fn watch_docs(docs_path string, path_src string, path_build string) ! {
|
||||
|
||||
Reference in New Issue
Block a user