Skip to content

feat: VitePress documentation site with SAP Fiori styling#15

Merged
jung-thomas merged 12 commits intomainfrom
feature/vitepress-docs
Apr 22, 2026
Merged

feat: VitePress documentation site with SAP Fiori styling#15
jung-thomas merged 12 commits intomainfrom
feature/vitepress-docs

Conversation

@jung-thomas
Copy link
Copy Markdown
Contributor

@jung-thomas jung-thomas commented Apr 22, 2026

Summary

  • Adds a VitePress documentation site at docs-site/ with SAP Fundamental Styles (sap_horizon light/dark themes)
  • Custom Fiori shellbar replaces default VitePress nav, with search integration, dark mode toggle, and version badge
  • Hero homepage with feature cards (6 capabilities: Inject, MCP Server, Learn, Doctor, Content Packs, Design Archive)
  • Auto-discovers 110+ spec and plan documents from docs/superpowers/ as a "Design Archive" sidebar section
  • Three-layer CSS architecture: SAP theming base → fundamental-styles components → VitePress variable bridge
  • Content copied from /docs/ at build time (single source of truth)
  • GitHub Actions workflow deploys to GitHub Pages on push to main

Architecture

docs/                          ← source of truth (markdown)
docs-site/
├── scripts/copy-content.js    ← copies docs + generates archive sidebar
├── .vitepress/
│   ├── config.mts             ← sidebar, nav, archive escaping plugins
│   └── theme/
│       ├── index.ts           ← custom layout with frontmatter routing
│       ├── style.css          ← 3-layer CSS (SAP → Fundamental → VitePress)
│       └── components/
│           ├── FioriShellbar.vue
│           └── FioriHome.vue
├── public/                    ← favicon.svg, og-image.svg
└── index.md                   ← layout: FioriHome

Notable design decisions

  • Archive content escaping: Three defense layers handle Vue-incompatible content in 110+ archive docs (Go {{ }} template syntax, pseudo-HTML <placeholder> tags)
  • isCustomElement with regex guard: Only lowercase tags hit the custom element path; PascalCase Vue components are unaffected
  • Content not committed to docs-site/: guide/, developer/, archive/ dirs are in .gitignore and regenerated every build

Test plan

  • npm run build completes without errors (42s, 110 archive pages)
  • Homepage renders shellbar + hero banner + 6 feature cards (verified via SSR output)
  • Content pages render shellbar + sidebar + doc body
  • Archive pages render without Vue compilation errors
  • Dark mode CSS variables mapped correctly
  • Visual browser verification of homepage, content page, dark mode toggle
  • GitHub Pages deployment after merge

- Add version badge to FioriShellbar (MAJOR)
- CI uses npm run build not npx vitepress build (MAJOR)
- Fix --vp-c-bg-soft mapping to --sapContent_ForegroundColor
- Use --sapFontFamily variable with fallback
- Add og-image.svg to public/ and og:image meta
- Add Overview (homepage) to Getting Started sidebar
…ive import

- Add .vitepress/config.mts: full site config with nav, nested sidebar,
  archive sidebar loaded from archive-sidebar.json, local search, theme,
  base path, and vue/vite settings
- Add index.md with FioriHome layout frontmatter (placeholder for Task 4)
- Extend copy-content.js with escapeArchiveContent() to sanitize pseudo-HTML
  tags in archive docs (<uuid>, <id>, <query>, etc.) that would break Vue's
  template compiler; escapes non-HTML5 tags outside fenced code blocks
…s bridge

All @import statements consolidated at top of style.css (CSS spec compliance,
eliminates Vite ordering warnings). Dark mode overrides scoped to html.dark.
VitePress variable bridge maps --sap* custom properties to --vp-c-* tokens.
The previous approach registered FioriHome as a global Vue component,
but VitePress's custom Layout() override doesn't resolve frontmatter
layout values to registered components. Detect layout === 'FioriHome'
directly in Layout() and render the component with shellbar above it.
- C1: add copy-content.js to build script so npm run build works standalone
- I1: expand isCustomElement HTML5 set to full spec (matches copy-content.js)
- I2: handle up to 3 spaces of indentation for fenced code block detection
- I3: add explicit contents:read permission in GitHub Actions workflow
@jung-thomas jung-thomas merged commit f049c97 into main Apr 22, 2026
2 checks passed
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.

1 participant