Skip to content

docs: migrate from Mintlify to Docusaurus 3 (issue #62) - #63

Merged
planetf1 merged 31 commits into
ibm-granite:mainfrom
planetf1:main
Jun 9, 2026
Merged

planetf1 merged 31 commits into
ibm-granite:mainfrom
planetf1:main

Conversation

@planetf1

@planetf1 planetf1 commented Jun 4, 2026 •

Copy link
Copy Markdown
Collaborator

This PR migrates the IBM Granite docs site from the Mintlify hosted platform to
Docusaurus 3 + GitHub Pages, resolving issue #62. The existing public URL
structure (`/granite/docs/...`) is preserved exactly via `routeBasePath:
'granite/docs'`, so all inbound links and SEO continue to resolve without any
redirects. Content is ported faithfully — the intent is a clean platform swap,
not a content rewrite.

Reviewers: a live preview is deployed and ready to browse.
Walk both sidebars (Docs + Cookbooks), check dark mode, search, and the
Download Granite button before approving.

Fork preview: https://planetf1.github.io/granite-docs/granite/docs/models/granite4-1

What changed

Scaffold and config

  • Docusaurus 3.10 scaffold — `package.json`, `tsconfig.json`,
    `docusaurus.config.ts`, `sidebars.ts`. Single `@docusaurus/plugin-content-docs`
    instance with two named sidebars (`docsSidebar`, `cookbooksSidebar`) matching
    the two tabs in `docs.json`.
  • `routeBasePath: 'granite/docs'` — existing public URLs unchanged.
  • Env-driven baseUrl — `DOCS_BASE_URL` derived from
    `github.event.repository.name` so any fork gets the correct GH Pages prefix
    automatically; no config changes needed when reviewing via a fork.
  • MDX components — `Card`, `CardGroup`, `Icon`, `Accordion`, `AccordionGroup`,
    `CodeGroup` (stacked shim). Registered via `src/theme/MDXComponents.tsx`.
  • Content sweep — all 47 `.mdx` files: `sidebarTitle:` → `sidebar_label:`,
    `icon:`/`url:` frontmatter keys removed, ``/`` converted to
    native `:::note`/`:::warning`, internal links rewritten to absolute
    `/granite/docs/...` (drop `.mdx` extension). All content changes are mechanical
    platform-compatibility edits — no prose was changed.
  • CI (`.github/workflows/docs-publish.yml`) — build + markdownlint +
    codespell on every PR; lychee external link check on schedule/dispatch;
    deploy to `gh-pages` on push to `main`. SHA-pinned actions, `permissions: {}`
    top-level. Production cutover env vars documented in workflow comments.

Visual and UX customisations (Docusaurus defaults → Granite)

The goal is to match the look and feel of the Mintlify site as closely as
practical without over-constraining the Docusaurus theme. Each deviation from
the Docusaurus default is listed with its reason, so the same decisions can be
evaluated independently if this approach is adopted for other projects (e.g. mellea).

Typography

Property Docusaurus default This site Reason
`--ifm-h1-font-size` `2rem` (32px) `1.75rem` (28px) Mintlify maple page titles are ~28px; 32px felt oversized
`--ifm-h2-font-size` `1.5rem` (24px) `1.375rem` (22px) Proportionally smaller to match heading scale
`--ifm-heading-font-weight` `700` (bold) `600` (semibold) IBM Plex Sans Bold is heavier than Mintlify's semibold headings
Sidebar nav font-size inherited 16px `0.875rem` (14px) Mintlify sidebar items are 14px
Sidebar category weight inherited `600` (semibold) Section headings (Models, Run Granite…) were bold in Mintlify
Sidebar leaf item weight inherited `400` (normal) Individual page links were normal weight in Mintlify

Navbar

Property Docusaurus default This site Reason
`--ifm-navbar-link-color` `#1c1e21` (dark grey) `#000000` Mintlify uses pure black; the grey read as low contrast
Navbar link weight inherited (400) `500` Slightly heavier, matches Mintlify's navbar style

Fonts (self-hosted)

The original Mintlify site self-hosted IBM Plex Sans and IBM Plex Mono. The
initial Docusaurus scaffold loaded them from Google Fonts CDN. This PR restores
self-hosting using `@ibm/plex` (npm, OFL-1.1):

  • IBM Plex Sans: weights 300/400/500/600/700 + italics
  • IBM Plex Mono: weights 400/500 + italic

`@font-face` declarations are injected via `headTags` in `docusaurus.config.ts`
using `BASE_URL` as a prefix, so font paths resolve correctly at any deploy
subdirectory (e.g. `/docs/` on GitHub Pages, `/` in production). Eliminates the
Google Fonts CDN dependency for privacy/GDPR compliance.

Sidebar icons

Mintlify renders the `icon:` frontmatter field as a small icon next to each
sidebar item. Docusaurus has no native equivalent; this is implemented via:

  1. `sidebar_custom_props: {icon: "..."}` added to all 47 MDX content files
    (icon names from the original `icon:` frontmatter). The icon lives in the
    content file — `sidebars.ts` needs no changes for individual pages.
  2. Ejected `src/theme/DocSidebarItem/Link` renders `item.customProps.icon` inside
    the `` element so it inherits active/hover colour state correctly.
  3. Ollama category (the only group icon in the original nav) gets
    `customProps: {icon: 'download'}` directly in `sidebars.ts`.

Icon library

The original `docs.json` specifies `"icons": {"library": "lucide"}` but many icon
names are Font Awesome style names that Mintlify silently remaps. The Icon
component uses Font Awesome Free (solid + brands) as the primary library:

  • FA Free covers ~90% of icon names directly
  • FA Pro-only names (e.g. `bee`, `hat-chef`, `sparkles`) use the nearest FA Free
    equivalent (`faBug`, `faUtensils`, `faWandMagicSparkles`)
  • `shield-check` falls back to Lucide `ShieldCheck` (only remaining Lucide dependency)
  • SVG-path icons (Colab logo: `images/icons8-google-colab.svg`) render as
    `` via `useBaseUrl()` so the path resolves correctly at any deploy prefix

The same Icon component is used for both sidebar icons and Card content icons,
giving visual consistency across the site.

Content rendering

  • Description subtitle — ejected `DocItem/Content` renders the `description:`
    frontmatter field as a subtitle paragraph between the H1 and the page body
    (matching Mintlify's subtitle display). Empty descriptions are skipped.
  • No "Edit this page" — `editUrl` omitted; all changes go through CI, not
    direct GitHub edits.
  • No last-updated footer — `showLastUpdateTime` and `showLastUpdateAuthor`
    both false. The date sat between content and prev/next navigation, which looked
    odd; the git history is the authoritative source for content freshness.

SEO

All 8 model pages previously had `description: ""`. Each now has a
content-derived description that appears in ``,
`og:description`, and as the subtitle paragraph below the page title.

Docs versioning

Reviewers familiar with `generative-computing/mellea#1174` may notice that
versioning was not included. That is intentional. Mellea's versioning is tied to
its Python package release pipeline. Granite-docs has no equivalent lifecycle:
model launches add new pages rather than replacing existing ones. Every merge to
`main` updates the live site directly. Versioning can be added non-destructively
later if needed.

Where this fits

Issue #62 — platform migration only. Production cutover (repointing
`ibm.com/granite/docs` away from Mintlify) is an IBM web-infra action outside
this repo, to be coordinated separately after this lands.

Deliberately out of scope (follow-up issues to open)

  1. `CodeGroup` → native Tabs — 67 uses of Mintlify's tab-switcher component
    currently shimmed as stacked display. Converting requires per-file MDX surgery
    and risks regressions in a migration PR.
  2. Orphaned pages — 7 pages not in the original `docs.json` nav are suppressed
    with `displayed_sidebar: null`. Need content review before reconnecting.
  3. Production cutover — repoint `ibm.com/granite/docs` from Mintlify to GH
    Pages. Add `static/CNAME` once the target host is known. See workflow comments
    for the required `DOCS_SITE_URL` / `DOCS_BASE_URL` env vars.
  4. Sidebar category icons — only `DocSidebarItem/Link` is ejected; category
    headings with icons would need `DocSidebarItem/Category` swizzled separately.
  5. `stage` branch cleanup — 29 commits behind `main`, untouched since
    2025-12-03. Safe to delete.

Testing

  • `npm run build` is clean (`onBrokenLinks: 'throw'`, `onBrokenAnchors: 'throw'`
    — build fails on any broken internal link or anchor).
  • Both sidebars verified: Models, Run Granite (Ollama subgroup), Cookbooks
    categories. Sidebar icons render. Cards render with icons. CardGroups grid.
    Accordions expand. Note/Warning admonitions styled. Dark mode toggle. Search.
    Playground external link. Download Granite navbar button.
  • LM Studio screenshots and Colab SVG icons verified in built HTML.
  • CI green on fork: https://github.com/planetf1/granite-docs/actions
  • Fork preview live and browsable at the URL above.

Closes #62

planetf1 added 3 commits June 4, 2026 12:56
Replaces the Mintlify documentation setup with a Docusaurus 3.10 site
that builds cleanly and deploys to GitHub Pages via a single CI job.

## What changed

**Scaffold**: package.json, tsconfig.json, docusaurus.config.ts,
sidebars.ts, src/ (theme, components, css, pages), static/ (assets).

**Config**: env-driven baseUrl/url so the same build previews on a fork
(planetf1.github.io/docs/) and deploys on the upstream host.
routeBasePath is set to 'granite/docs' so all existing public URLs
(/granite/docs/...) keep resolving without redirects.

**Components**: MDX shims for Mintlify constructs used in content —
Card, CardGroup (with lucide-react icon rendering), CodeGroup (stacked
shim; tab UX is a follow-up), Accordion/AccordionGroup (details/summary).

**Content sweep** (49 MDX files):
- sidebarTitle → sidebar_label
- icon: frontmatter removed (Mintlify-only)
- <Note>/<Warning> converted to native :::note/:::warning admonitions
- Internal absolute /granite/docs/... links preserved (routeBasePath
  matches, .mdx extensions dropped)
- Playground href updated to full external URL
- responsible-ai/index: external-URL-only page replaced with stub +
  sidebar link entry pointing to ibm.com/granite/trust
- 7 orphaned pages (not in docs.json nav) marked displayed_sidebar: null
  and deferred to a follow-up issue for nav reconnection review
- 2 pre-existing broken links fixed (time-series, docling-rag)

**CI** (.github/workflows/docs-publish.yml): build-and-validate on PRs,
deploy on push to main. Includes markdownlint and codespell (soft gates,
continue-on-error). External link check via lychee on schedule only.
SHA-pinned actions, permissions: {} top-level + least-privilege per job.

Closes #62

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
- checkout: use de0fac2 (v6) matching mellea
- setup-node: v4 SHA
- upload-artifact: 043fb46 (v7) matching mellea
- download-artifact: 3e5f45b (v8) — was pointing at non-existent v4 SHA
- Add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true env var

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
DOCS_BASE_URL is now derived from github.event.repository.name so that
any fork gets the correct /<repo-name>/ prefix automatically, matching
the GH Pages URL that GitHub assigns. The upstream ibm-granite/docs
continues to use /docs/.

Also update docusaurus.config.ts default to /docs/ and make SITE_URL
configurable via DOCS_SITE_URL env var.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
planetf1 added 5 commits June 4, 2026 13:42
- Pin lycheeverse/lychee-action to SHA (v2.8.0) — all other actions
  were already pinned; lychee was the only floating tag
- Add schedule: cron trigger so link-check job actually runs weekly;
  the condition referenced 'schedule' but the trigger was never defined
- Add DOCS_SITE_URL env derived from github.repository_owner so fork
  previews get the correct canonical URL instead of planetf1.github.io
- Drop hardcoded 'https://planetf1.github.io' fallback from config;
  DOCS_SITE_URL defaults to ibm-granite.github.io
- Remove docs.json (Mintlify config — migration parity confirmed)
- Remove root fonts/ (duplicate of static/fonts/; Docusaurus only
  serves from static/)
- Remove granite/docs/analytics.js (duplicate of static/analytics.js)
- Remove src/components/Note.tsx and Warning.tsx (dead code — content
  was converted to native :::note/:::warning; neither is registered
  in MDXComponents.tsx and no MDX uses them)
- Fix stale analytics.js header comment referencing Mintlify
- Add dev-mode console.warn in Icon for unmapped icon names so
  conversion gaps are visible during npm start

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
- Set onBrokenLinks/onBrokenAnchors to 'throw' so broken internal
  links fail CI rather than passing silently
- Fix dead links in orphaned pages that were blocking 'throw':
  granite-code-on-replicate: ./granite-vs-code-extension →
  ./granite-code-with-continue (the actual VS Code assistant page);
  models/code: add /granite/docs/ prefix to two internal card hrefs
- Remove @docusaurus/faster dependency (package was declared but
  the future: experimental_faster config key was never set, so it
  did nothing; remove rather than silently depend on it)
- Remove @font-face fallback blocks from custom.css; the absolute
  /fonts/... paths 404 under the /docs/ baseUrl used on GH Pages
  staging — Google Fonts @import on line 1 covers both weights already

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
CardGroup was using repeat(N, 1fr) which locked to a fixed column
count regardless of screen width. Switch to auto-fit with a 280px
minimum so the grid collapses to a single column on mobile, matching
what ajbozarth flagged on the equivalent mellea PR.

Also remove "Mintlify-compatible" from the README components section —
these are Docusaurus components now.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Without explicit styling the active ToC entry is only distinguishable
by a faint colour shift, easy to miss on long pages. Add a left border
accent + slightly bolder weight to make the current position clear,
matching the visual convention Mintlify used.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
…compat

static/fonts/ woff2 files are no longer referenced (font-face blocks were
removed in the prior commit; Google Fonts import covers both weights).

CardGroup cols prop comment clarifies it is accepted for back-compat with
existing MDX that passes cols={2}, but layout is now auto-fit responsive.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Plain <a href="/granite/docs/..."> resolves against the domain root,
which breaks on fork GH Pages where baseUrl is /granite-docs/ rather
than /. @docusaurus/Link prepends baseUrl for internal paths and
passes external URLs through unchanged.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
@planetf1

planetf1 commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

I'll add some comments of my own from a manual review

  • We've lost the iconography in the navigation bar ie
Screenshot 2026-06-05 at 12 13 19 Screenshot 2026-06-05 at 12 12 39
  • the fonts in the nav differ - I don't see this as an issue generally, though I note the main page titles are a little larger, and may wrap on smaller window sizes

  • The left navbar defaults to expanded in the original site, whilst in the new site it's folded (at least beyond the first section)

  • The new site has an in-doc navigator -- I think this is an improvement

  • On the cookbooks page we have a subtitle on each page on the old site - this is missing on the new site ie:

Screenshot 2026-06-05 at 12 17 45 Screenshot 2026-06-05 at 12 17 37

We've lost more iconography on the hero boxes - for example in cookbooks/forecast energy demand our new github icon is simple, and there's no notebook icon vs the strong versions in the original

Screenshot 2026-06-05 at 12 21 13 Screenshot 2026-06-05 at 12 21 07

planetf1 added 14 commits June 5, 2026 12:28
- Icon.tsx: handle SVG-path icons (href starting with '/') by rendering
  an <img> instead of silently returning null. Fixes the Colab icon
  being invisible on all cookbook Cards that use
  icon="/granite/docs/images/icons8-google-colab.svg".

- Card.tsx: increase icon size 16→20px and remove opacity:0.7 so Card
  icons are visually comparable to the original site.

- docusaurus.config.ts: add sidebarCollapsed:false so all sidebar
  categories default to expanded, matching the original Mintlify
  behaviour.

- src/theme/DocItem/Content: swizzle to render the 'description'
  frontmatter field as a subtitle paragraph below the page title.
  Only shown when non-empty, so model pages (description:"") are
  unaffected.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Sidebar items on both the Docs and Cookbooks tabs now show the same
icons as the original Mintlify site.

Mechanism:
- sidebar_custom_props: {icon: "..."} added to all 47 MDX content files,
  restoring the icon values that were stripped during migration. The
  icon name lives in the content file — no changes to sidebars.ts
  needed for individual pages.
- Ollama category gets customProps: {icon: "download"} directly in
  sidebars.ts (the only category-level icon in the original nav).
- New ejected swizzle src/theme/DocSidebarItem/Link reads
  item.customProps.icon and renders it inline inside the <Link> element
  so it inherits active/hover colour state correctly.

Icon library:
- Migrated Icon component from lucide-react to @fortawesome/react-fontawesome
  (free-solid + free-brands). FA Free covers ~90% of the original icon
  names directly; the remaining ~10% that are FA Pro-only use the nearest
  free equivalent (bee → faBug, hat-chef → faUtensils, sparkles →
  faWandMagicSparkles, etc.). shield-check falls back to lucide-react
  ShieldCheck (only remaining Lucide dependency).
- Card icons on content pages (github, arrow-right, book, rocket…) now
  also render via FA, giving visual consistency across sidebar and cards.
- SVG-path icons (Colab logo) continue to render as <img>.

Also adds a production cutover note to docs-publish.yml documenting
the DOCS_SITE_URL / DOCS_BASE_URL values required for IBM hosting.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Fonts:
- Replace Google Fonts CDN import with self-hosted IBM Plex Sans and
  IBM Plex Mono (OFL-1.1) sourced from the @ibm/plex npm package.
  Weights: Sans 300/400/500/600/700 + italics; Mono 400/500 + italics.
- @font-face declarations are emitted via headTags in docusaurus.config.ts
  so the path prefix is the resolved BASE_URL, not hard-coded '/'. This
  ensures fonts load correctly whether the site is at / or a subdirectory
  (e.g. /docs/ on GitHub Pages).
- No external network request needed to render the IBM Plex typeface;
  eliminates the Google Fonts dependency for privacy/GDPR compliance.

SEO:
- Add page-specific description frontmatter to all 8 model pages that
  previously had empty descriptions. Each description is derived from
  the page's own Overview section and is accurate to the content.
  Pages now get distinct og:description and <meta name="description">
  values instead of falling back to the site-level generic string.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Two classes of broken asset references, both caused by Mintlify-era
absolute paths that don't account for Docusaurus baseUrl:

1. Colab SVG icon (18 Card occurrences + 1 sidebar_custom_props):
   icon="/granite/docs/images/icons8-google-colab.svg"
   → icon="images/icons8-google-colab.svg"
   Icon component now calls useBaseUrl() for any non-FA/Lucide path, so
   the correct baseUrl prefix (/docs/ on GH Pages, / in production) is
   applied at runtime.

2. LM Studio step screenshots (5 <img> tags):
   src="/granite/docs/images/lmstudio/..."  (absolute, not processed)
   → ![alt](../images/lmstudio/...)  (markdown syntax, webpack-processed)
   Webpack now content-hashes the PNGs and rewrites the src correctly.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
The previous wrapper approach injected the description before
OriginalDocItemContent, which put it above the H1. Ejected the
component properly so the description paragraph is inserted between
the synthetic title and MDXContent, matching the original site order:
  Title (H1) → Description subtitle → Page body

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Sidebar nav items inherited the 16px body font size and 400 weight,
making them visually heavier than the original site.

- All .menu__link: 0.875rem (14px), weight 400
- Category headings (.menu__link--sublist): weight 600 (bold),
  matching Mintlify's bold section labels (Introduction, Models, etc.)

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
- Remove editUrl: no "Edit this page" link on public site; all changes
  go through CI not direct GitHub edits.
- showLastUpdateAuthor: false: don't surface individual contributor
  names; CI bot would show as author in production anyway.
- showLastUpdateTime kept: "Last updated on <date>" is useful context.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
showLastUpdateTime: false — the date sat between page content and the
prev/next paginator, which looked odd. On a public CI-deployed site it
adds little value; the git history is the authoritative source.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
- --ifm-font-size-base: 15px (down from 16px): IBM Plex Sans renders
  slightly larger than the system fonts Mintlify defaults to; 15px
  aligns the visual weight more closely.
- .markdown max-width: 680px: Mintlify maple constrains prose content
  to ~680px via Tailwind prose; Docusaurus fills a wider column
  (~770px with TOC). This is the main reason the new site feels larger.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Constraining .markdown to 680px wastes horizontal space on wide
screens and breaks code blocks. Let Docusaurus manage column widths.
Keep the 15px base font-size reduction from the previous commit.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Docusaurus default --ifm-h1-font-size is 2rem (32px). Mintlify maple
page titles are ~1.75rem (28px). Body text was already the same (16px)
in both platforms.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
- --ifm-h2-font-size: 1.375rem (22px, down from 1.5rem/24px)
- --ifm-heading-font-weight: 600 (semibold, down from 700/bold)
  IBM Plex Sans Bold is heavier than Mintlify's semibold headings.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Infima defaults navbar links to #1c1e21 (dark grey). Mintlify uses
pure black. Also add font-weight:500 to match Mintlify's slightly
heavier navbar link weight.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
The three Ollama OS variants (Mac/Linux/Windows) clutter the sidebar
when expanded. collapsed: true overrides the global sidebarCollapsed:
false for this category only.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
@planetf1

planetf1 commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

I've made some updates to look more similar to the old site. I've left the new right doc nav in place. Fonts and font sizes should be closer now as is iconography. Things like search bar placement have been left as docusaurus defaults.

Please review. thanks

I suggest this site is published no later than Wed 10th, so having all reviews submitted by Mon 11th (allowing a day for updates) would be preferable. With agreement we can go sooner.

@serjikibm

Copy link
Copy Markdown
Collaborator

Looks great! I have some comments. Haven't gotten a chance to dig deeper and provide solutions, just capturing for now.

Blocked script execution in 'https://s.company-target.com/s/sync?exc=lr' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
  • Seeing a lot of the warning below. If harmless we can ignore.
v1.7-1708:46 WARNING: Tags are firing before consent is initialized. Please ensure that the consent mode default is initialized before firing tags.
  • The footer hover over link colors make them illegible

Note

The footer link comments below should account for the analytics parameters. I am suggesting the plain links.

- granite.mdx: fix missing small.png via webpack import (same root
  cause as LM Studio images — JSX <img src> is not webpack-processed;
  import + {smallPng} reference resolves it correctly).
- Footer Ollama link: granite4 → granite4.1
- Footer Blog link: ibm.com/blog → research.ibm.com/blog?tag=artificial-intelligence
- Footer link hover: override to white — dark footer + black primary
  hover color made links unreadable on hover.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
@planetf1

planetf1 commented Jun 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

Thanks @serjikibm — fixes in c3ac206:

  • small.png missing on Granite 4.0 — fixed. JSX <img src> in MDX isn't processed by webpack; added an import statement so the path resolves correctly.
  • Ollama footer link updated to granite4.1
  • Blog footer link updated to research.ibm.com as you suggested — worth noting this was the same link on the old Mintlify site, so it's an improvement rather than a regression
  • Footer hover colors fixed — dark background + our black primary was making the links invisible on hover

On the console errors: these are preview-only artefacts.

ibm-common.js expects IBM's production web stack — specifically a consent management platform (OneTrust) to initialise defaults before GTM fires, and IBM's CSP headers for the audience-sync iframe. Neither is present on GitHub Pages, which is why both warnings appear there.

Fixed in 01d0ad9: analytics now only loads on *.ibm.com. Eliminates both errors on the preview and stops review traffic polluting IBM analytics. Will run normally on production.

The script was running on the GitHub Pages preview, which caused two
console errors (sandboxed iframe, consent-before-tags) and sent noise
to IBM analytics with a preview siteId. Both errors are from
ibm-common.js and only surface outside IBM's production web stack,
which provides the consent platform and correct CSP headers.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>

@serjikibm serjikibm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM... thanks for making the changes.

@ajbozarth ajbozarth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — this delivers what issue #62 asked for: a clean platform swap that preserves URL structure, ports content faithfully, and lands well ahead of the 2026-06-13 license deadline.

I checked out the branch locally and verified:

  • npm run build is clean against onBrokenLinks: 'throw' / onBrokenAnchors: 'throw' / onDuplicateRoutes: 'throw' — the strongest available signal for a migration of this shape
  • All 49 MDX files migrated mechanically: no <Note> / <Warning> / <Tip> survive, no top-level icon: / url: / sidebarTitle: frontmatter, no .mdx extensions in internal links
  • All 8 orphan pages suppressed via displayed_sidebar: null as advertised
  • All sidebar entries resolve to existing files
  • routeBasePath: 'granite/docs' preserves all inbound URLs without a redirect map — the #1 SEO/inbound-link risk in a platform swap, killed cleanly
  • Env-driven DOCS_BASE_URL makes fork previews "just work" with no per-fork config edits
  • CI workflow has the right shape: SHA-pinned actions, permissions: {} top-level, concurrency with cancel-in-progress, build artifact handed to deploy job (so deploy can't drift from what was validated), production cutover env vars documented inline
  • Self-hosted IBM Plex via @ibm/plex removes the Google Fonts CDN dependency

Inline comments below are all optional follow-ups — none should block merge. The two I'd most encourage acting on before publish are the markdownlint / codespell CI no-op and tightening the lychee excludes.

One pre-existing nit not introduced by this PR but worth noting for a later sweep: granite/docs/use-cases/multimodal-rag.mdx:26 hard-codes https://www.ibm.com/granite/docs/models/granite/ (with trailing slash). Under trailingSlash: false this only works via a server-side redirect at the production host. An internal absolute link would be more robust.

Architectural note worth surfacing: @docusaurus/plugin-content-docs runs single-instance with two named sidebars rather than two plugin instances. Simpler config, but means the two tabs can't be independently versioned. Fine for now (PR description explains why versioning is deferred); flagging in case Cookbooks ever wants its own lifecycle.

Cutover hand-off looks ready: the env-var delta for IBM web infra is already documented in .github/workflows/docs-publish.yml:7-13.

Comment thread .github/workflows/docs-publish.yml Resolved
Comment thread .github/workflows/docs-publish.yml Resolved
Comment thread .github/workflows/docs-publish.yml Resolved
Comment thread docusaurus.config.ts Resolved
Comment thread src/components/Icon.tsx Resolved
Comment thread src/components/Card.tsx Resolved
Add the production URL and explain that every merge to main deploys
automatically — no staging, no versioning. Describes final state.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
@planetf1

planetf1 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

PR has two approvals and is otherwise ready. We're holding the merge pending confirmation from IBM web-infra on how ibm.com/granite/docs will be routed to GitHub Pages — a service request is being raised now. Once we have the routing details we'll do a single follow-up PR to update the CI env vars (DOCS_SITE_URL, DOCS_BASE_URL) and any static/CNAME if needed, then merge.

No further review needed at this point.

planetf1 and others added 4 commits June 8, 2026 16:22
Use destination_dir: granite/docs in the gh-pages deploy so the build
lands at /{repo-name}/granite/docs/ on GitHub Pages for any repo name —
no rename required. Combined with routeBasePath: '/' and
DOCS_BASE_URL=/{repo-name}/granite/docs/, every asset (JS, CSS, fonts,
images) is served from under the same granite/docs/ path the Akamai
proxy rule already covers.

Akamai ask: update /granite/docs/* target from Mintlify to
ibm-granite.github.io/docs/granite/docs — same rule type, new origin.
Remove /mintlify-assets/* rule. No new rules, no path rewriting.

Also strips the now-redundant /granite/docs/ prefix from internal MDX
links and JSX href attributes (routeBasePath is '/' so paths are
relative to baseUrl directly).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The staging fork (planetf1/granite-docs) also needs DOCS_BASE_URL=/granite/docs/
so that asset paths in the built HTML match /granite/docs/assets/... and are
covered by the single /granite/docs/* proxy rule. Without this, assets would
be prefixed with /granite-docs/granite/docs/ and fail to load through the proxy.

Also fixes local dev default BASE_URL and README local dev URL.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Matches the licensing pattern used across all other ibm-granite repos:
- LICENSE: stock Apache 2.0 text (identical to granite-io, granite-common, etc.)
- package.json: "license": "Apache-2.0" field
- SPDX-License-Identifier: Apache-2.0 header on all TypeScript, TSX, and CSS
  source files; no headers on MDX documentation files (consistent with
  model repos which carry no per-file headers in markdown content)
- proxy-*.mjs local test utilities added to .gitignore

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Drop || true from markdownlint and codespell so issues surface as step
  annotations; continue-on-error: true still prevents build blocking
- Remove redundant package-lock.json from codespell --skip (*.json covers it)
- Add comment on plugin-client-redirects explaining it is pre-wired empty
  for post-cutover redirect entries

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
… migration)

The page was present in the original Mintlify docs.json navigation but was
incorrectly given displayed_sidebar: null during migration. Remove the
suppression and add it to the Responsible AI sidebar section.

The remaining 6 suppressed pages were genuinely absent from the Mintlify nav
and are tracked for content review in #66.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@planetf1
planetf1 merged commit 5471164 into ibm-granite:main Jun 9, 2026
planetf1 added a commit that referenced this pull request Jun 10, 2026
The planetf1/granite-docs hardcode in the DOCS_BASE_URL condition was
added temporarily to validate the Akamai staging path (#63).
That staging target is confirmed working, so the special case is no longer
needed and actively breaks GitHub Pages previews on that fork — assets 404
because the base URL doesn't match the /repo-name/ path GitHub Pages serves
forks at.

Restores two-tier behaviour:
- ibm-granite/docs → /granite/docs/ (IBM.com public path, proxied by Akamai)
- any fork       → /{repo-name}/granite/docs/ (GitHub Pages preview path)

Also adds a repository layout reference to README and tightens up the
contributing guide with optional frontmatter fields and the CodeGroup
component.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.

Migrate documentation site from Mintlify to Docusaurus 3

3 participants