diff --git a/index.html b/index.html
index e2c4757..78a54f3 100644
--- a/index.html
+++ b/index.html
@@ -1111,8 +1111,8 @@
contentCache: {},
searchIndex: [],
expandedSections: new Set(),
- repo: "infinition/AcidWiki", // Fallback
- branch: "main",
+ repo: "infinition/Bjorn", // Fallback
+ branch: "wiki",
currentTitle: "",
currentFolder: "",
currentFilename: ""
@@ -1407,28 +1407,28 @@
// --- 4. WIKI CORE ---
async function initWiki() {
try {
- debugLog('[AcidWiki] π Initializing wiki...');
+ debugLog('[Bjorn] π Initializing wiki...');
// Try GitHub API first for production
let structure = await fetchWikiStructureFromAPI();
// If API fails, try local filesystem scanning (for local HTTP servers)
if (!structure) {
- debugLog('[AcidWiki] π Trying local filesystem scan...');
+ debugLog('[Bjorn] π Trying local filesystem scan...');
structure = await scanLocalFilesystem();
}
if (!structure || Object.keys(structure).length === 0) {
if (CONFIG.features.showRootReadme) {
- debugLog('[AcidWiki] βΉοΈ No docs found, but root README is enabled. Proceeding...');
+ debugLog('[Bjorn] βΉοΈ No docs found, but root README is enabled. Proceeding...');
structure = {}; // Empty but valid
} else {
- console.error('[AcidWiki] β No wiki content found!');
+ console.error('[Bjorn] β No wiki content found!');
throw new Error("No wiki content found. Please add .md files to wiki/docs/");
}
}
- debugLog('[AcidWiki] β
Wiki structure loaded successfully');
+ debugLog('[Bjorn] β
Wiki structure loaded successfully');
STATE.wikiData = structure;
const firstFolder = Object.keys(STATE.wikiData)[0];
@@ -1457,22 +1457,22 @@
async function fetchWikiStructureFromAPI() {
// CORRECTION : On autorise l'API mΓͺme en mode local, tant qu'il y a un repo configurΓ©
if (!STATE.repo) {
- debugLog('[AcidWiki] βοΈ Skipping GitHub API (no repo configured)');
+ debugLog('[Bjorn] βοΈ Skipping GitHub API (no repo configured)');
return null;
}
- const branchesToTry = [CONFIG.branch, 'main', 'master'];
+ const branchesToTry = [CONFIG.branch, 'wiki', 'master'];
for (const branch of branchesToTry) {
if (!branch) continue;
- debugLog(`[AcidWiki] π Fetching structure from GitHub API: ${STATE.repo}/${branch}`);
+ debugLog(`[Bjorn] π Fetching structure from GitHub API: ${STATE.repo}/${branch}`);
try {
const res = await fetch(`https://api.github.com/repos/${STATE.repo}/git/trees/${branch}?recursive=1`);
if (!res.ok) {
- debugLog(`[AcidWiki] β οΈ Branch "${branch}" failed (${res.status})`);
+ debugLog(`[Bjorn] β οΈ Branch "${branch}" failed (${res.status})`);
continue;
}
- debugLog(`[AcidWiki] β
GitHub API response received for branch: ${branch}`);
+ debugLog(`[Bjorn] β
GitHub API response received for branch: ${branch}`);
const data = await res.json();
const structure = {};
let fileCount = 0;
@@ -1510,31 +1510,31 @@
}
const sortedStructure = sortStructure(structure);
- debugLog(`[AcidWiki] β
GitHub discovery complete: Found ${fileCount} files`);
+ debugLog(`[Bjorn] β
GitHub discovery complete: Found ${fileCount} files`);
return Object.keys(sortedStructure).length > 0 ? sortedStructure : null;
} catch (e) {
- debugLog(`[AcidWiki] β Error fetching branch "${branch}":`, e);
+ debugLog(`[Bjorn] β Error fetching branch "${branch}":`, e);
}
}
return null;
}
async function scanLocalFilesystem() {
- debugLog('[AcidWiki] π Starting local filesystem scan...');
+ debugLog('[Bjorn] π Starting local filesystem scan...');
try {
// Try to fetch the wiki/docs/ directory listing
const res = await fetch('./wiki/docs/');
if (!res.ok) {
- debugLog('[AcidWiki] β Cannot access wiki/docs/ directory');
+ debugLog('[Bjorn] β Cannot access wiki/docs/ directory');
return null;
}
- debugLog('[AcidWiki] β
Successfully accessed wiki/docs/');
+ debugLog('[Bjorn] β
Successfully accessed wiki/docs/');
const structure = {};
// Recursive function to scan a folder
async function scanFolder(path = '', parentStructure = structure) {
- debugLog(`[AcidWiki] π Scanning folder: wiki/docs/${path || '(root)'}`);
+ debugLog(`[Bjorn] π Scanning folder: wiki/docs/${path || '(root)'}`);
const folderUrl = path ? `./wiki/docs/${path}/` : './wiki/docs/';
const folderRes = await fetch(folderUrl);
@@ -1548,7 +1548,7 @@
let filesFound = 0;
let foldersFound = 0;
- debugLog(`[AcidWiki] π Found ${links.length} links in HTML`);
+ debugLog(`[Bjorn] π Found ${links.length} links in HTML`);
for (const link of links) {
const href = link.getAttribute('href');
@@ -1558,7 +1558,7 @@
// Skip navigation links
if (linkText === '..' || linkText === '~') {
- debugLog(`[AcidWiki] βοΈ Skipped navigation link: "${linkText}"`);
+ debugLog(`[Bjorn] βοΈ Skipped navigation link: "${linkText}"`);
continue;
}
@@ -1569,14 +1569,14 @@
// Only process links that contain wiki/docs in their path
if (!href.includes(baseDocsPath)) {
- debugLog(`[AcidWiki] βοΈ Skipped (not in wiki/docs): "${href}"`);
+ debugLog(`[Bjorn] βοΈ Skipped (not in wiki/docs): "${href}"`);
continue;
}
// Extract the part after /wiki/docs/
const afterDocs = href.split(baseDocsPath)[1];
if (!afterDocs) {
- debugLog(`[AcidWiki] βοΈ Skipped (invalid path after wiki/docs): "${href}"`);
+ debugLog(`[Bjorn] βοΈ Skipped (invalid path after wiki/docs): "${href}"`);
continue;
}
@@ -1585,7 +1585,7 @@
// If we're scanning '01_General', afterDocs should start with '01_General/' and next segment is the child
const expectedPrefix = path ? `${path}/` : '';
if (path && !afterDocs.startsWith(expectedPrefix)) {
- debugLog(`[AcidWiki] βοΈ Skipped (not in current path "${path}"): afterDocs="${afterDocs}"`);
+ debugLog(`[Bjorn] βοΈ Skipped (not in current path "${path}"): afterDocs="${afterDocs}"`);
continue;
}
@@ -1595,7 +1595,7 @@
// Only accept direct children: should not contain additional slashes (except trailing for folders)
const withoutTrailingSlash = relativePart.endsWith('/') ? relativePart.slice(0, -1) : relativePart;
if (withoutTrailingSlash.includes('/')) {
- debugLog(`[AcidWiki] βοΈ Skipped (not a direct child): relativePart="${relativePart}"`);
+ debugLog(`[Bjorn] βοΈ Skipped (not a direct child): relativePart="${relativePart}"`);
continue;
}
@@ -1622,13 +1622,13 @@
}
if (!folderName || folderName.trim() === '' || folderName === '..') {
- debugLog(`[AcidWiki] βοΈ Skipping invalid folder name: "${folderName}"`);
+ debugLog(`[Bjorn] βοΈ Skipping invalid folder name: "${folderName}"`);
continue;
}
const fullPath = path ? `${path}/${folderName}` : folderName;
- debugLog(`[AcidWiki] π Found folder: ${folderName} (${fullPath})`);
+ debugLog(`[Bjorn] π Found folder: ${folderName} (${fullPath})`);
foldersFound++;
if (!parentStructure[folderName]) {
@@ -1638,15 +1638,15 @@
try {
await scanFolder(fullPath, parentStructure[folderName]);
} catch (e) {
- console.warn(`[AcidWiki] β οΈ Failed to scan subfolder ${fullPath}:`, e);
+ console.warn(`[Bjorn] β οΈ Failed to scan subfolder ${fullPath}:`, e);
}
} else {
- debugLog(`[AcidWiki] βοΈ Skipped non-markdown file: "${href}"`);
+ debugLog(`[Bjorn] βοΈ Skipped non-markdown file: "${href}"`);
}
}
- debugLog(`[AcidWiki] β Folder scan complete: ${filesFound} files, ${foldersFound} subfolders`);
- debugLog(`[AcidWiki] π Structure for "${path || 'root'}":`, Object.keys(parentStructure));
+ debugLog(`[Bjorn] β Folder scan complete: ${filesFound} files, ${foldersFound} subfolders`);
+ debugLog(`[Bjorn] π Structure for "${path || 'root'}":`, Object.keys(parentStructure));
}
// Start recursive scanning from root
@@ -1668,12 +1668,12 @@
const sortedStructure = sortStructure(structure);
const totalItems = JSON.stringify(sortedStructure).split('.md').length - 1;
- debugLog(`[AcidWiki] β
Scan complete! Found ${totalItems} markdown files`);
- debugLog('[AcidWiki] π Structure:', sortedStructure);
+ debugLog(`[Bjorn] β
Scan complete! Found ${totalItems} markdown files`);
+ debugLog('[Bjorn] π Structure:', sortedStructure);
return Object.keys(sortedStructure).length > 0 ? sortedStructure : null;
} catch (e) {
- console.error('[AcidWiki] β Local filesystem scan failed:', e);
+ console.error('[Bjorn] β Local filesystem scan failed:', e);
return null;
}
}
@@ -1755,9 +1755,9 @@
content: text.toLowerCase(),
titleLower: (CONFIG.ui.rootReadmeTitle || "Project Home").toLowerCase()
});
- debugLog("[AcidWiki] π Root README indexed.");
+ debugLog("[Bjorn] π Root README indexed.");
})
- .catch(e => console.warn("[AcidWiki] Failed to index README.md", e))
+ .catch(e => console.warn("[Bjorn] Failed to index README.md", e))
);
}
@@ -1779,7 +1779,7 @@
titleLower: CONFIG.ui.changelogTitle.toLowerCase(),
isVirtual: true
});
- debugLog("[AcidWiki] π Changelog indexed.");
+ debugLog("[Bjorn] π Changelog indexed.");
})
.catch(() => { })
);
diff --git a/wiki/config.js b/wiki/config.js
index 655216a..c7856ef 100644
--- a/wiki/config.js
+++ b/wiki/config.js
@@ -1,5 +1,5 @@
/**
- * AcidWiki Configuration (Master Template)
+ * Bjorn Wiki Configuration (Master Template)
* Ce fichier est Γ©crasΓ© dynamiquement par le workflow GitHub Actions.
* Ne modifiez pas les valeurs ici pour un projet spΓ©cifique, utilisez acidwiki.json.
*/