From 8583989f603a22e5730ef2448d5d6a0538491971 Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Fri, 6 Feb 2026 11:12:46 -0800 Subject: [PATCH 1/2] changes to support addition of ai resources plugin --- llms_config.json | 29 +++++++++++++++++++++++++++++ material-overrides/main.html | 22 ++++++---------------- mkdocs.yml | 1 + 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/llms_config.json b/llms_config.json index d2e6f05e..9c7b7190 100644 --- a/llms_config.json +++ b/llms_config.json @@ -31,6 +31,35 @@ "Tooling", "Reference" ], + "categories_info": { + "Basics": { + "description": "Polkadot general knowledge base to provide context around overview and beginner-level content." + }, + "Reference": { + "description": "Reference material including key functions and glossary." + }, + "Smart Contracts": { + "description": "How to develop and deploy Solidity smart contracts on Polkadot Hub." + }, + "Parachains": { + "description": "How-to guides related to building, customizing, deploying, and maintaining a parachain." + }, + "dApps": { + "description": "Information and tutorials for application developers." + }, + "Networks": { + "description": "Information about Polkadot networks." + }, + "Polkadot Protocol": { + "description": "In-depth details about the Polkadot Protocol." + }, + "Infrastructure": { + "description": "Guide to node infrastructure." + }, + "Tooling": { + "description": "Developer tooling resources." + } + }, "exclusions": { "skip_basenames": [ "README.md", diff --git a/material-overrides/main.html b/material-overrides/main.html index 939b3789..d564e6ab 100644 --- a/material-overrides/main.html +++ b/material-overrides/main.html @@ -345,27 +345,17 @@ const SITE_BASE = location.origin.replace(/\/+$/, ''); // current host const AI_BASE = '/ai'; // relative path to AI content on same host - const stripLeading = (value) => value.replace(/^\/+/, ''); - const toAbsolute = (rawPath) => { if (!rawPath) return null; - const dataPath = rawPath.trim(); - if (/^https?:\/\//i.test(dataPath)) return dataPath; // already absolute - - const normalized = stripLeading(dataPath); + let dataPath = rawPath.trim(); + if (/^https?:\/\//i.test(dataPath)) return dataPath; - // All AI content is served from the AI_BASE on the current host - if (normalized.startsWith('ai/')) { - return `${SITE_BASE}${AI_BASE}/${stripLeading(normalized.replace(/^ai\//, ''))}`; + // Ensure leading slash for site-absolute paths + if (!dataPath.startsWith('/')) { + dataPath = '/' + dataPath; } - // NOTE: same-origin assets: default for everything we ship in docs/ (llms, ai bundles, etc.) - // llms.txt is served from the site root; other AI artifacts live under /ai - if (normalized === 'llms.txt') return `${SITE_BASE}/${normalized}`; - if (dataPath.startsWith('/')) return `${SITE_BASE}/${stripLeading(dataPath)}`; - - // Fallback → site-relative - return `${SITE_BASE}/${normalized}`; + return `${SITE_BASE}${dataPath}`; }; const downloadViaFetch = async (url, filename) => { diff --git a/mkdocs.yml b/mkdocs.yml index bbb7f82f..06261f04 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -115,6 +115,7 @@ plugins: exclude: - ai/* - awesome-nav + - ai_resources_page - resolve_md: llms_config: llms_config.json - page_toggle From 4ccc64fd0c383a571d925dfb17256115b637094f Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Fri, 6 Feb 2026 12:25:09 -0800 Subject: [PATCH 2/2] refactor main.html to remove anything now handled by plugin --- material-overrides/main.html | 68 ++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/material-overrides/main.html b/material-overrides/main.html index d564e6ab..ce526dcf 100644 --- a/material-overrides/main.html +++ b/material-overrides/main.html @@ -341,23 +341,21 @@ });