Skip to content

Fix 545 broken .md links and add dark/light theme toggle to documentation#2941

Merged
fermga merged 3 commits into
gh-pagesfrom
copilot/fix-documentation-links
Nov 13, 2025
Merged

Fix 545 broken .md links and add dark/light theme toggle to documentation#2941
fermga merged 3 commits into
gh-pagesfrom
copilot/fix-documentation-links

Conversation

Copilot AI commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

The HTML documentation contained 110 unique broken links to non-existent .md files. Additionally, the site lacked a theme toggle despite having theme support built-in.

Changes

Link Fixes (183 files, 545 replacements)

  • Replace .md links with correct HTML directory paths
  • Map grammar/GLOSSARY.mdGLOSSARY/
  • Map root-level docs (AGENTS.md, ARCHITECTURE.md, etc.) → directory paths with trailing /
  • Redirect src/* paths to GitHub repository URLs
  • Redirect CONTRIBUTING.md to GitHub blob URL

Dark/Light Mode Toggle (183 files)

  • Add theme toggle button in header before search
  • Toggle between default (light) and slate (dark) via data-md-color-scheme
  • Persist preference to localStorage
  • IIFE initialization prevents theme flash on load
  • Icon swaps: sun (☀️) in light mode, moon (🌙) in dark mode
<button class="md-header__button md-icon theme-toggle-button" 
        onclick="toggleTheme()">
  <svg id="theme-icon-light">...</svg>
  <svg id="theme-icon-dark" style="display: none;">...</svg>
</button>

<script>
function toggleTheme() {
  const scheme = body.getAttribute('data-md-color-scheme');
  body.setAttribute('data-md-color-scheme', 
    scheme === 'slate' ? 'default' : 'slate');
  localStorage.setItem('theme-preference', newScheme);
}
</script>

Note: Changes are to generated HTML. If site rebuilds from source, theme toggle needs MkDocs config implementation.

Original prompt

arregla los enlaces de toda la documentacion

Custom agent used: TNFR
TNFR Agent


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 13, 2025 15:11
Co-authored-by: fermga <203334638+fermga@users.noreply.github.com>
Co-authored-by: fermga <203334638+fermga@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix links in the entire documentation Fix 545 broken .md links and add dark/light theme toggle to documentation Nov 13, 2025
Copilot AI requested a review from fermga November 13, 2025 15:19
@fermga fermga marked this pull request as ready for review November 13, 2025 15:19
Copilot AI review requested due to automatic review settings November 13, 2025 15:19
@fermga fermga merged commit e2a416d into gh-pages Nov 13, 2025
1 check passed
@fermga fermga deleted the copilot/fix-documentation-links branch November 13, 2025 15:20
Copilot AI removed the request for review from Copilot March 23, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants