Introducing a new way to review your PRs.

Read the announcement

getredash / redash

Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.

View on GitHub

20 documents · Updated Nov 11, 2026

docs / website-pages-content-and-migration

Website pages, content, and migration pipeline

The public website turns route definitions, structured content, documentation, and static assets into the published Redash site. It also protects links from the old Gatsby and Netlify sites, so the migration keeps both public visitors and links from the Redash app working.

Public page routes

The site exposes two related page groups. Marketing routes present the product and community site, while the /help/ route presents the knowledge base. Astro builds both groups as static HTML with directory-style URLs. The marketing pages use a shared page shell and preserve the visual and browser behavior of the older site.

References: website/README.md• L1-12 website/astro.config.mjs• L20-25

Marketing route groups

Marketing routes cover the product story, data-source discovery, customer proof, community pages, and legal text. A route supplies page metadata and selects the page content; the shared layout supplies the document head, site chrome, analytics, and iframe support.

Route groupPurposeContent source
/, /product/Introduce Redash and its product valueReact page components
/integrations/, /data-sources/<slug>/Help visitors find supported systems and read a system pagedataSources collection
/customers/, /case-studies/Show customer use and proofReact page components and customer data
/about/, /community/Explain the company and open-source communityReact page components and contributor data
/privacy/, /terms/, /community/code_of_conduct/Publish policy and conduct texttextPages collection

The integration index groups data-source entries as databases, integrations, and partners. A data-source entry can appear in that index without receiving its own page when it has no route path. This keeps the index useful for supported systems while allowing entries that only describe a listing.

References: website/…/index.astro• L6-25 website/…/content.config.ts• L7-18

Documentation routes

The documentation route serves Markdown and MDX files from the repository-level docs/ directory under /help/. The file path is the URL path, with index.md representing its parent path. Top-level sections form the navigation tree, and page metadata controls titles and order.

The site builds three documentation views:

ViewURLRole
Stable/help/Latest released documentation and the searchable, indexed view
Next/help/next/Unreleased documentation from the main development line
Archive/help/v/<version>/Documentation for an older release

Each non-stable view carries a version notice, stays out of search results, and points its canonical URL to the stable page. Links written as /help/ are changed to the matching version in an archive so readers do not leave the selected documentation set.

References: website/…/kb.mjs• L9-20 website/…/kb.mjs• L22-38 website/…/rehype-docs-base.mjs• L1-14 website/…/Head.astro• L1-20 website/…/Banner.astro• L1-23

Content collections

Content collections give structured page data a clear contract before it reaches a route. The collection type decides which metadata is required and whether a file is a page, an index entry, or documentation content.

Data-source collection

The dataSources collection represents database, integration, and partner entries. Each entry has a display name and logo. An optional path decides whether the entry has a public landing page and which route group owns it. The page body is available to the route, while the integration index mainly uses the front matter to build its groups.

References: website/…/content.config.ts• L7-18 website/…/index.astro• L6-25 website/…/[slug].astro• L6-17

Text-page collection

The textPages collection holds short public text pages such as privacy, terms, and the community code of conduct. Each page has a title and a public path. Dedicated routes select the entry and render its Markdown through the shared marketing shell.

References: website/…/content.config.ts• L20-27 website/…/privacy.astro• L1-10 website/…/terms.astro• L1-10

Documentation collection

The docs collection reads the repository-level documentation and applies the Starlight document schema. It accepts normal documentation metadata and an optional keyword list for page metadata. Files prefixed with _ and the documentation README are excluded from published pages.

The collection path and documentation URL are kept separate on purpose. The source stays beside the code it explains, while the public URL remains under /help/.

References: website/…/content.config.ts• L29-46 website/…/kb.mjs• L48-55

Static assets

Static assets support page identity, content, and delivery without a runtime page server. Files in website/public/ are copied into the build output as-is, so public URLs such as /assets/images/... remain stable across the site migration.

The asset boundary also carries deployment behavior. _redirects controls legacy URL handling, _headers permits the Redash app to frame help pages and caches fingerprinted files, and the remaining images and files support marketing pages and content entries. The Cloudflare asset configuration adds automatic trailing-slash handling and serves the built 404 page when no file matches.

References: website/README.md• L28-41 website/…/_headers• L1-8 website/wrangler.jsonc• L1-12

Migration pipeline

The migration pipeline moves the old Gatsby knowledge base and Netlify redirect rules into the current static site model. The migration scripts are reviewable, one-time tools; the generated content and redirect rules are the durable part of the published site.

Knowledge-base migration

The knowledge-base migration reads old page front matter and places each article at the path that now defines its URL. It converts old link and callout forms into documentation links and Starlight content, then removes duplicate page titles where the documentation layout already supplies them. Links are resolved through the old redirect map so moved articles point to their final destination.

This makes the file path the stable source of the new documentation URL. A page with children becomes a category index, while a page without children remains an article.

References: website/…/migrate-kb.mjs• L1-13 website/…/migrate-kb.mjs• L39-57 website/…/migrate-kb.mjs• L62-100

URL migration

The redirect migration turns old website and documentation-host rules into Cloudflare-compatible outputs. It follows old redirect chains to final pages, keeps exact URLs and trailing-slash variants covered, and separates redirects for redash.io from redirects that are managed for docs.redash.io.

The live redirect file is part of the public URL contract. Redirects take precedence over files, so a rule must point to the final page and must not hide a page that now exists.

References: website/…/migrate-redirects.mjs• L1-12 website/…/migrate-redirects.mjs• L40-70 website/…/_redirects• L1-6

Versioned documentation build

The production build creates the development documentation first, then builds stable and archived documentation from the refs listed in versions.json. It merges only each ref's documentation into the common output, while marketing pages continue to come from the current checkout. The stable build supplies the searchable documentation index and documentation sitemap.

The result is one static site with several documentation versions. If the stable version has not moved into the archive list, its version URL redirects to the stable page so links to that release continue to work.

References: website/…/build-site.mjs• L1-13 website/…/build-site.mjs• L48-68 website/…/build-site.mjs• L71-105 website/versions.json• L1-5

The following diagram shows how source content and migration rules become the published site.

flowchart LR
  A[Marketing routes and data] --> B[Astro build]
  C[docs Markdown and MDX] --> D[Versioned docs builds]
  E[Legacy content and URLs] --> F[Migration utilities]
  F --> C
  F --> G[Redirect rules]
  B --> H[Static build output]
  D --> H
  G --> H
  I[Public assets and headers] --> H
  H --> J[Cloudflare static site]

Validation mechanisms

Validation checks the published build as a user would see it. The redirect checker models Cloudflare's order of operations: redirect rules first, then files, then automatic directory redirects. It checks old-site URLs, hard-coded repository URLs, in-app help links, and targets from the old documentation host.

The check fails when a URL reaches a 404, needs more than one redirect rule, points to a redirect loop, or names an anchor that is absent from the final page. It also rejects redirect rules that shadow real pages or point to a non-page target.

References: website/…/check-redirects.mjs• L1-12 website/…/check-redirects.mjs• L31-71 website/…/check-redirects.mjs• L74-118

Legacy anchor compatibility

Old app links can include heading anchors that use capital letters and a legacy separator format. The Markdown pipeline adds those old anchor IDs beside the current heading IDs, so an in-app help link still lands at the intended section after the page moves to the new renderer.

References: website/…/rehype-legacy-anchors.mjs• L1-5 website/…/rehype-legacy-anchors.mjs• L11-31

In-app help compatibility

The Redash app opens help pages in an iframe and tracks navigation through iframe_url messages. The page shell keeps the site frameable and reports normal navigation, hash changes, and unloads to the parent window. This contract applies to documentation and must remain intact when the public layout changes.

References: website/…/IframeBridge.astro• L1-34 website/…/_headers• L1-4

Change checklist

When these files or sections are changed, remember to consider these:

  • When a documentation file moves, update website/public/_redirects and confirm old page and heading URLs still resolve.
  • When a documentation heading changes, preserve the anchor names used by client/…/HelpTrigger.jsx or update every caller.
  • When a data-source path changes, check both the collection index grouping and the matching dynamic route.
  • When the stable release changes, update website/versions.json so the version build, switcher, sitemap, and canonical links agree.
  • When a public asset path changes, update content front matter and page references that use the old URL.
  • When the help layout changes, preserve iframe framing and iframe_url messages for the Redash app.

Important failure modes

TriggerConsequenceGuard
A redirect points to another redirectVisitors need multiple hops or the URL check failsKeep each source pointed at the final page and run pnpm check:redirects
A legacy heading anchor is removedIn-app help opens the page but not the requested sectionKeep the legacy-anchor plugin active and validate anchors in the built output
A data-source entry has a wrong or missing pathThe item appears in the wrong index group or has no landing pageKeep front matter aligned with the dynamic route prefix
A stable or archive ref is unavailable during a required buildThe published documentation can fail to build instead of silently showing the wrong releaseResolve the ref and use REQUIRE_REFS for deployment builds
Help pages block framingThe Redash help drawer cannot display documentationKeep the frame-ancestors policy and iframe bridge contract

Key files

FileWhy to read it
website/…/content.config.tsDefines the contracts for marketing and documentation content
website/…/kb.mjsMaps documentation files to URLs, sections, and versions
website/src/pages/integrations/index.astroShows how structured content becomes a public index
website/src/pages/integrations/[slug].astroShows how a content entry becomes a route
website/…/build-site.mjsCoordinates marketing, stable, next, and archive output
website/…/migrate-kb.mjsDocuments the old knowledge-base to new content conversion
website/…/migrate-redirects.mjsDocuments the old URL rules to Cloudflare rule conversion
website/…/check-redirects.mjsDefines the published URL and anchor checks
website/public/_redirectsHolds the live legacy URL contract
website/src/components/IframeBridge.astroDefines the Redash app help-drawer contract
website/…/rehype-legacy-anchors.mjsPreserves old documentation heading links
website/versions.jsonSelects the stable and archived documentation refs