Skip to content

Conversation

@djm81
Copy link
Collaborator

@djm81 djm81 commented Jan 5, 2026

Summary

This PR adds Mermaid.js support to render interactive diagrams on GitHub Pages documentation.

Changes

Mermaid.js Integration

  • Added Mermaid.js CDN script (v10) to Jekyll layout
  • Added JavaScript to convert mermaid code blocks to renderable divs
  • Handles kramdown output format (<pre><code class="language-mermaid">)
  • Initializes Mermaid with proper configuration (theme, security, flowchart settings)

Files Modified

  • docs/_layouts/default.html - Added Mermaid.js script and conversion logic

Technical Details

The integration works by:

  1. Kramdown outputs mermaid blocks as: <pre><code class="language-mermaid">graph TD...</code></pre>
  2. JavaScript finds all blocks with class="language-mermaid"
  3. Converts them to: <div class="mermaid">graph TD...</div>
  4. Mermaid.js renders them as interactive diagrams

Verification

  • ✅ Build tested locally - Jekyll build succeeds
  • ✅ Found 10+ mermaid blocks in command-chains page
  • ✅ Mermaid.js script and conversion code verified in built HTML
  • ✅ Valid mermaid syntax confirmed

Impact

  • All Mermaid diagrams on GitHub Pages will now render as interactive diagrams
  • Improves documentation readability and user experience
  • Works with all existing mermaid code blocks (no changes needed to markdown files)

Related

  • Fixes diagram rendering issue on GitHub Pages
  • Affects pages: command-chains, openspec-journey, ai-ide-workflow, architecture, etc.

djm81 and others added 18 commits January 5, 2026 00:46
- Create integrations-overview.md with comprehensive overview of all integrations
- Add links from integration guides to integrations-overview.md
- Add link to integrations-overview.md in docs/README.md
- Complete optional task 6.4 from improve-documentation-structure change
- Fix MD036 warnings by converting emphasis to proper headings
- Fix MD040 warning by adding language specifier to code block
- Update website links to specfact.com / .io / .dev
- Add GitHub Pages docs link: https://nold-ai.github.io/specfact-cli/
- Remove version info section (avoids outdated info)
- Simplify content - remove verbose sections, add links to docs instead
- Add links to new documentation:
  - Command Chains Reference
  - Common Tasks Quick Reference
  - AI IDE Workflow Guide
  - Integrations Overview
- Improve onboarding with clear path for new users
- Add specfact.com, specfact.io, specfact.dev links prominently at top
- Add domain purpose context (commercial, ecosystem, developer community)
- Highlight specfact.dev for developers
- Add GitHub Pages docs link
- Improve user navigation to appropriate resources
- Add Step 2: Initialize IDE integration (specfact init --ide)
- Update Step 3: Use slash commands in IDE or CLI
- Add realistic timing expectations (10-15 min for typical repos)
- Explain what init does (copies prompts, makes slash commands available)
- Add link to AI IDE Workflow Guide
- Remove unrealistic '60 seconds' claim
- Update permalinks to include full directory path (e.g., /reference/commands/ instead of /commands/)
- Add frontmatter with permalinks to agile-scrum-workflows.md and reference/README.md
- Add frontmatter with permalink to speckit-journey.md for consistency
- All permalinks now match the Jekyll configuration pattern
- Enables proper GitHub Pages URLs for platform-frontend sites
- Quote title in speckit-journey.md frontmatter to fix YAML parsing error
- Wrap Jinja2 template code in {% raw %} tags in agile-scrum-workflows.md
  to prevent Jekyll from parsing it as Liquid syntax

Fixes GitHub Pages build errors:
- YAML Exception in speckit-journey.md (line 3)
- Liquid syntax error in agile-scrum-workflows.md (line 708)
- Keep quoted title to fix YAML parsing error
- Resolves conflict between dev (quoted) and main (unquoted)
- Add Command Chains to Guides section
- Add Agile/Scrum Workflows to Guides section
- Add Reference Documentation index to Reference section

These pages were missing from the navigation menu after fixing permalinks.
- Add Command Chains to Guides section (top of list)
- Add Agile/Scrum Workflows to Guides section
- Add Reference Documentation index to Reference section
- Fix reference links to use correct permalinks (/reference/architecture/, etc.)

The sidebar navigation menu is hardcoded in the layout file, so these
pages need to be manually added to appear in the left sidebar.
- Add Mermaid.js CDN script to layout
- Add JavaScript to convert mermaid code blocks to renderable divs
- Handle kramdown output format (pre > code.language-mermaid)
- Initialize Mermaid with proper configuration

Fixes Mermaid diagram rendering on GitHub Pages documentation.
All mermaid code blocks will now render as interactive diagrams.
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@djm81 djm81 self-assigned this Jan 5, 2026
@djm81 djm81 added the documentation Improvements or additions to documentation label Jan 5, 2026
@djm81 djm81 moved this to In Progress in SpecFact CLI Jan 5, 2026
@djm81 djm81 merged commit 86bee62 into main Jan 5, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in SpecFact CLI Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants