Public website platform
The public website is an Astro site that publishes Redash marketing pages and the knowledge base as one static site. It turns shared page content into HTML, preserves the public URL and iframe contracts used by the Redash app, and deploys the built assets to Cloudflare at redash.io. Page content, content collections, and migration rules are described in Website pages, content, and migration.
Platform boundary
The website has two related public surfaces. Astro serves the marketing site at the root paths, while Starlight serves the knowledge base under /help/; both are assembled into one deployable asset bundle. This keeps the site shell and the help system on the same host while allowing their content to follow different release rules. References: website/astro.config.mjs• L20-52, website/…/content.config.ts• L29-46, website/…/build-site.mjs• L78-95
The site is static after the build. A request does not run application logic or query a database at the edge; Cloudflare serves the matching file and applies the site's redirect, header, trailing-slash, and not-found rules. This gives the public site a simple runtime boundary and leaves dynamic product behavior to the Redash app. References: website/wrangler.jsonc• L1-12, website/astro.config.mjs• L20-25
Request handling
The request path selects a prebuilt page, a migrated content entry, or a compatibility rule. Astro emits directory-shaped URLs with trailing slashes, Cloudflare normalizes requests to that shape, and _redirects sends old URLs to their final destinations. The result is one public URL system that supports current pages and legacy links. References: website/astro.config.mjs• L20-25, website/wrangler.jsonc• L7-12, website/public/_redirects#L1-L7
The public site also acts as an embedded help surface. The Redash app can load a help page in an iframe; the site reports the current URL to the parent window and hides site chrome in drawer mode. Its response headers allow framing from the app and preserve this contract without adding a server component. References: website/src/components/IframeBridge.astro#L1-L33, website/src/components/docs/Head.astro#L16-L21, website/public/_headers#L1-L4
When a request enters the help surface, the site keeps links inside the selected documentation version and preserves older heading anchors used by the app. This lets old app links continue to reach the right section even as the docs renderer changes. References: website/…/rehype-docs-base.mjs• L1-14, website/…/rehype-legacy-anchors.mjs• L1-31
The main request path is summarized below.
flowchart LR
A[Browser or Redash help drawer] --> B{Public URL}
B -->|Marketing path| C[Astro page]
B -->|/help path| D[Starlight knowledge-base page]
B -->|Legacy path| E[Redirect rule]
C --> F[Static asset bundle]
D --> F
E --> G[Canonical page]
F --> H[Cloudflare static assets]
G --> H
Shared presentation
The marketing page shell gives each public page a common document head, navigation, footer, style set, analytics hook, and iframe bridge. Individual pages provide their page content inside this shell, so changes to public metadata or site-wide behavior can affect all marketing routes. References: website/src/layouts/MarketingLayout.astro#L1-L14, website/src/layouts/MarketingLayout.astro#L16-L52
The presentation layer uses Astro for the page boundary and reuses React components for the migrated marketing content. These components render shared navigation, links, footer groups, feature sections, cards, and page bodies as part of the static build; they do not make the public site a client-rendered application. References: website/…/Layout.jsx• L1-14, website/…/Header.jsx• L27-128, website/…/Footer.jsx• L5-68
The shared navigation connects the marketing pages to the docs and to community destinations. The footer gets its link groups from site data, which keeps repeated navigation content separate from page templates. References: website/…/Header.jsx• L58-124, website/…/Footer.jsx• L1-31, website/…/footer_links.json• L1-200
The site keeps client behavior small and focused. The marketing shell supports menu and help-dropdown behavior, while the optional analytics component adds GA4 only when a measurement ID is supplied. References: website/src/layouts/MarketingLayout.astro#L53-L71, website/src/components/Analytics.astro#L1-L22
Content integration
The public site reads migrated content through Astro content collections. Text pages provide legal and community documents, while data-source entries provide the names, logos, paths, and page metadata used by integration lists and landing pages. The collection schema is the contract between content authors and the page templates. References: website/…/content.config.ts• L7-27, website/…/postgresql.md• L1-7
The integration index groups content into databases, integrations, and partners. Entries with a public path become landing-page links; entries without one remain display-only cards. A detail route then combines the selected entry with a shared data-source presentation. References: website/src/pages/integrations/index.astro#L1-L26, website/src/pages/integrations/[slug].astro#L1-L18, website/…/IntegrationsCard.jsx• L5-30
The knowledge base reads Markdown from the repository's top-level docs area rather than copying it into the website project. Its URL is derived from the document path, and the same site can render the current checkout, a stable release, or an archived release under a different help prefix. See Website pages, content, and migration for the content model and migration pipeline. References: website/…/content.config.ts• L29-42, website/…/kb.mjs• L1-20, website/…/kb.mjs• L48-55
Build and deployment
The production build creates the marketing site and the unreleased docs view from the current checkout. It then builds stable and archived documentation from the refs named in versions.json, merges only those docs into the main output, and adds the stable search index and sitemap entries. This produces one bundle with several documentation versions and one marketing surface. References: website/…/build-site.mjs• L1-13, website/…/build-site.mjs• L48-68, website/…/build-site.mjs• L71-105, website/versions.json• L1-5
GitHub Actions is the build coordinator. Changes to website, docs, or the website workflows run the site build and redirect check; pull requests publish the build as an artifact for a separate preview job, while master can deploy the artifact to Cloudflare. Release branches that carry stable docs trigger a rebuild from master so production credentials stay protected. References: .github/…/website.yml• L1-18, .github/…/website.yml• L37-87, .github/…/website.yml• L89-111, .github/…/website-preview.yml• L1-7
Cloudflare receives only the generated dist directory. The deployment is an assets-only Worker configuration, so the edge serves files without a site-specific request handler. Pull-request previews upload the same built files under a PR alias and report the preview URL back to the pull request. References: website/wrangler.jsonc• L1-12, .github/…/website-preview.yml• L34-63
The deployment flow has these stages:
- Install the website's pinned Node and pnpm dependencies.
- Build the marketing pages and the selected documentation versions.
- Check redirects against the built output.
- Upload the static bundle as a pull-request preview or deploy it to
redash.iofrom master.
References: website/package.json• L5-12 .github/…/website.yml• L49-87
Change checklist
When these files or sections are changed, remember to consider these:
- Update the route, content schema, and integration card contract together when a data-source path or frontmatter field changes.
- Check both
/help/and versioned help builds when changing docs URL rewriting, version metadata, or the shared docs head. - Run the redirect check when a page path, trailing-slash rule, or legacy target changes. A redirect target must exist in the built bundle.
- Preserve the iframe URL message, drawer mode, frame-ancestors header, and legacy heading anchors when changing help presentation.
- Keep the production build and preview workflow aligned on the artifact path and the PR marker file.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A stable or archive ref in versions.json cannot be resolved during a required production build | The documentation version build fails instead of silently using current docs | REQUIRE_REFS is enabled for the master production build. References: website/…/build-site.mjs• L23-45, .github/…/website.yml• L71-76 |
| A redirect points to a missing page or forms a chain | Legacy links return an error or require more than one hop | The website workflow runs check:redirects after the build. References: website/package.json• L7-12, .github/…/website.yml• L73-78 |
| The frame policy or iframe bridge is removed | The in-app help drawer cannot frame pages or track navigation | _headers and IframeBridge define the app contract. References: website/public/_headers#L1-L4, website/src/components/IframeBridge.astro#L12-L31 |
| A content entry has invalid required metadata or a path that does not match its route family | The build rejects the entry or renders no detail page for the link | Astro collection schemas and route filters validate the content boundary. References: website/…/content.config.ts• L7-27, website/src/pages/data-sources/[slug].astro#L6-L17 |
| The preview workflow receives an invalid or missing PR marker | The preview is not published or cannot be linked to the right pull request | The workflow validates .pr-number before upload. References: .github/…/website.yml• L79-81, .github/…/website-preview.yml• L40-45 |
Key files
| File | Why to read it |
|---|---|
| website/astro.config.mjs | Defines the Astro, Starlight, URL, sitemap, Markdown, and shared component boundaries. |
website/src/layouts/MarketingLayout.astro | Shows the common marketing document shell and browser behavior. |
| website/…/content.config.ts | Defines the content contracts for public pages and the top-level knowledge base. |
| website/…/kb.mjs | Explains documentation URL mapping, sections, and version-aware page identity. |
| website/…/build-site.mjs | Shows how marketing output and documentation versions become one deployable bundle. |
| website/wrangler.jsonc | Defines the Cloudflare static-asset runtime and request handling rules. |
| .github/…/website.yml | Shows the production and pull-request build gates and deployment boundary. |
website/src/components/IframeBridge.astro | Defines the contract with the Redash app's embedded help drawer. |
website/src/pages/integrations/index.astro | Shows how migrated data-source content becomes a public integration index. |
[Website pages, content, and migration](website-pages-content-and-migration) | Child page for route families, content ownership, and the migration pipeline. |