diff --git a/js/docsView.js b/js/docsView.js index 3cb2089e..7c0366ec 100644 --- a/js/docsView.js +++ b/js/docsView.js @@ -365,7 +365,9 @@ function resolveDocItem(slug) { } async function fetchToc() { + logger.dev.log("fetchToc: fetching", TOC_URL); const response = await fetch(TOC_URL); + logger.dev.log("fetchToc: response status", response.status); if (!response.ok) { throw new Error(`Failed to load TOC (${response.status})`); } @@ -407,6 +409,8 @@ async function renderMarkdown(path) { try { clearScrollSpy(); + logger.dev.log("renderMarkdown: fetching", path); + if (!window.marked || typeof window.marked.parse !== "function") { throw new Error("Markdown renderer is unavailable."); } @@ -584,8 +588,10 @@ function setupTocDrawer() { } async function initDocsView() { + logger.dev.log("initDocsView: starting"); try { tocState.items = await fetchToc(); + logger.dev.log("initDocsView: TOC items loaded", tocState.items); indexItems(tocState.items); renderToc(tocState.items); setupTocDrawer(); diff --git a/views/about.html b/views/about.html index 11944883..65f0bc7b 100644 --- a/views/about.html +++ b/views/about.html @@ -26,7 +26,7 @@ const loadMarkdown = async () => { try { - const response = await fetch("content/about.md"); + const response = await fetch("content/docs/about.md"); if (!response.ok) { throw new Error("Failed to load about.md"); } diff --git a/views/community-guidelines.html b/views/community-guidelines.html index b1178981..8b1ff7d3 100644 --- a/views/community-guidelines.html +++ b/views/community-guidelines.html @@ -30,7 +30,7 @@ const loadMarkdown = async () => { try { // Fetch the markdown file (change path if needed) - const response = await fetch("content/community-guidelines.md"); + const response = await fetch("content/docs/community/community-guidelines.md"); if (!response.ok) { throw new Error("Failed to load community-guidelines.md"); } diff --git a/views/getting-started.html b/views/getting-started.html index b6919fdc..d46edd52 100644 --- a/views/getting-started.html +++ b/views/getting-started.html @@ -30,7 +30,7 @@ const loadMarkdown = async () => { try { // Fetch the Markdown file - const response = await fetch("content/getting-started.md"); + const response = await fetch("content/docs/getting-started.md"); if (!response.ok) { throw new Error("Failed to load getting-started.md"); } diff --git a/views/links.html b/views/links.html index 71835bea..d72ac7c4 100644 --- a/views/links.html +++ b/views/links.html @@ -26,7 +26,7 @@ const loadMarkdown = async () => { try { - const response = await fetch("content/links.md"); + const response = await fetch("content/docs/community/links.md"); if (!response.ok) { throw new Error("Failed to load links.md"); } diff --git a/views/roadmap.html b/views/roadmap.html index e6b12495..3414fb81 100644 --- a/views/roadmap.html +++ b/views/roadmap.html @@ -27,7 +27,7 @@ const loadMarkdown = async () => { try { // Fetch your roadmap markdown - const response = await fetch("content/roadmap.md"); + const response = await fetch("content/docs/roadmap.md"); if (!response.ok) { throw new Error("Failed to load roadmap.md"); } diff --git a/views/upload-content.html b/views/upload-content.html index 7b5fce87..e4246b8a 100644 --- a/views/upload-content.html +++ b/views/upload-content.html @@ -29,7 +29,7 @@ const loadMarkdown = async () => { try { - const response = await fetch("content/upload-content.md"); + const response = await fetch("content/docs/guides/upload-content.md"); if (!response.ok) { throw new Error("Failed to load upload-content.md"); }