Fix incorrect markdown file paths in documentation views

- Updated `fetch` paths in legacy views (getting-started, upload-content, about, roadmap, community-guidelines, links) to point to the correct locations in `content/docs/`.
- Added debug logging to `js/docsView.js` to assist in diagnosing "Loading content..." hangs in the new documentation system.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-01-27 15:07:16 +00:00
1 parent 05d0b5c6b3
commit d490fa1295
7 files changed
+12 -6

No files matched your search

+6
View File
@@ -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();
+1 -1
View File
@@ -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");
}
+1 -1
View File
@@ -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");
}
+1 -1
View File
@@ -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");
}
+1 -1
View File
@@ -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");
}
+1 -1
View File
@@ -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");
}
+1 -1
View File
@@ -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");
}