Files
flow/docs/docusaurus.config.js
T
zeekayandHanzo Dev 5f360f4132 ci: publish the storybook through our own Sites plane; delete three foreign ones
Three site deploys in this repo published to planes that are not ours.

deploy-storybook.yml handed src/frontend/storybook-static to
actions/deploy-pages. It is a real static site, so it moves:
.hanzo/workflows/storybook.yml builds the export, POSTs
/v1/projects/flow-storybook/deploy, syncs the bytes straight to the S3 prefix
cloud names in the 202, then flips the deployment live — and marks it error if
the run dies after enqueueing, so cloud never records a deployment as "queued"
forever. Modelled on hanzoai/hips. It runs on hanzo-build-linux-amd64, a label
the forge runners actually advertise; a label nothing answers does not fail, it
queues silently until the 24h timeout.

This is a SEPARATE file from .hanzo/workflows/deploy.yml on purpose. That one
builds and pushes ghcr.io/hanzoai/flow — the App the operator runs. An App is a
container the cluster executes, a Site is bytes S3 serves; folding a docs
publish into an image build would couple it to a deployable release.

deploy_gh-pages.yml pushed docs/ to a gh-pages branch via
peaceiris/actions-gh-pages, and deploy-docs-draft.yml published per-PR docs
previews to an AWS S3 bucket behind CloudFront on upstream's account
(DOCS_AWS_ACCESS_KEY_ID, DOCS_DRAFT_CLOUD_FRONT_DISTRIBUTION_ID). Both are gone
with no native replacement, because this repo is not where these docs live:
hanzoai/docs carries them at apps/flow, and standing a second site up here would
be a second source of truth for one set of pages. docs/static/CNAME
(docs.flow.org) and docs/static/.nojekyll go with them — Pages artifacts that
mean nothing to S3.

The docs tree also shipped three third-party trackers: a Google gtag
(G-SLQFLQ3KPT), the consent-mode + TrustArc scripts feeding it, and a Segment
plugin reading SEGMENT_PUBLIC_WRITE_KEY. All removed, along with
@docusaurus/plugin-google-tag-manager, @mendable/search and
docs/src/plugins/segment. Telemetry goes to our own bus or nowhere.

Analytics on the storybook is the ONE hosted tag (cloud apps/analytics/tag.go)
posting to POST /v1/event. Its key is read from the project this run deploys, so
pk- rotation is one server-side change rather than five repo edits, and no key
means no tag: a keyless beacon is accepted 200 into $public, a tenant this org
cannot read.

Every other workflow stays. They are release, image-build, lint and test lanes,
not deploy planes.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-04 18:25:55 -07:00

480 lines
14 KiB
JavaScript

// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const path = require("path");
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const { remarkCodeHike } = require("@code-hike/mdx");
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "HanzoFlow Documentation",
tagline:
"HanzoFlow is a low-code app builder for RAG and multi-agent AI applications.",
favicon: "img/favicon.ico",
url: "https://docs.flow.org",
baseUrl: process.env.BASE_URL ? process.env.BASE_URL : "/",
onBrokenLinks: "throw",
onBrokenAnchors: "warn",
organizationName: "flow-ai",
projectName: "flow",
trailingSlash: false,
staticDirectories: ["static"],
markdown: {
hooks: {
onBrokenMarkdownLinks: "warn",
},
},
i18n: {
defaultLocale: "en",
locales: ["en"],
},
headTags: [
{
tagName: "link",
attributes: {
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&family=Sora:wght@550;600&display=swap",
},
},
],
presets: [
[
"@docusaurus/preset-classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: "/", // Serve the docs at the site's root
sidebarPath: require.resolve("./sidebars.js"), // Use sidebars.js file
sidebarCollapsed: true,
// Versioning configuration
lastVersion: "1.9.0",
versions: {
current: {
label: "1.10.x (Next)",
path: "next",
},
"1.9.0": {
label: "1.9.x",
path: "",
},
"1.8.0": {
label: "1.8.x",
path: "1.8.0",
},
},
beforeDefaultRemarkPlugins: [
[
remarkCodeHike,
{
theme: "github-dark",
showCopyButton: true,
lineNumbers: true,
},
],
],
},
sitemap: {
// https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-sitemap
// https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap
lastmod: "datetime",
changefreq: null,
priority: null,
ignorePatterns: [],
},
blog: false,
theme: {
customCss: [
require.resolve("@code-hike/mdx/styles.css"),
require.resolve("./css/custom.css"),
],
},
}),
],
[
"redocusaurus",
{
openapi: {
path: "openapi",
routeBasePath: "/api",
},
specs: [
{
id: "api",
spec: "openapi/openapi.json",
route: "/api",
},
{
id: "workflow",
spec: "openapi/flow-workflows-openapi.json",
route: "/api/workflow",
},
],
theme: {
primaryColor: "#7528FC",
},
},
],
],
plugins: [
// Alias so MDX can import code from the Flow repo with !!raw-loader!@flow/src/...
function flowCodeImportPlugin(context) {
return {
name: "flow-code-import",
configureWebpack() {
return {
resolve: {
alias: {
"@flow": path.resolve(context.siteDir, ".."),
},
},
};
},
};
},
["docusaurus-node-polyfills", { excludeAliases: ["console"] }],
"docusaurus-plugin-image-zoom",
[
"@docusaurus/plugin-client-redirects",
{
redirects: [
{
to: "/",
from: [
"/whats-new-a-new-chapter-flow",
"/👋 Welcome-to-Flow",
"/getting-started-welcome-to-flow",
"/guides-new-to-llms",
"/about-flow",
],
},
{
to: "/get-started-installation",
from: [
"/getting-started-installation",
"/getting-started-common-installation-issues",
],
},
{
to: "/get-started-quickstart",
from: "/getting-started-quickstart",
},
{
to: "/concepts-overview",
from: [
"/workspace-overview",
"/365085a8-a90a-43f9-a779-f8769ec7eca1",
"/My-Collection",
"/workspace",
"/settings-project-general-settings",
],
},
{
to: "/concepts-components",
from: [
"/components",
"/components-overview",
"/components-processing",
"/components-data",
"/components-files",
"/components-logic",
"/components-tools",
"/components-io",
"/components-helpers",
"/components-memories",
],
},
{
to: "/configuration-global-variables",
from: "/settings-global-variables",
},
{
to: "/concepts-playground",
from: [
"/workspace-playground",
"/workspace-logs",
"/guides-chat-memory",
],
},
{
to: "/data-types",
from: ["/guides-data-message", "/configuration-objects"],
},
{
to: "/concepts-flows",
from: [
"/travel-planning-agent",
"/starter-projects-travel-planning-agent",
"/tutorials-travel-planning-agent",
"/starter-projects-dynamic-agent/",
"/simple-agent",
"/math-agent",
"/starter-projects-simple-agent",
"/starter-projects-math-agent",
"/tutorials-math-agent",
"/sequential-agent",
"/starter-projects-sequential-agent",
"/tutorials-sequential-agent",
"/memory-chatbot",
"/starter-projects-memory-chatbot",
"/tutorials-memory-chatbot",
"/financial-report-parser",
"/document-qa",
"/starter-projects-document-qa",
"/tutorials-document-qa",
"/blog-writer",
"/starter-projects-blog-writer",
"/tutorials-blog-writer",
"/basic-prompting",
"/starter-projects-basic-prompting",
"/vector-store-rag",
"/starter-projects-vector-store-rag",
],
},
{
to: "/components-bundle-components",
from: [
"/components-rag",
"/components-vector-stores",
"/components-loaders",
],
},
{
to: "/api-keys-and-authentication",
from: [
"/configuration-api-keys",
"/configuration-authentication",
"/configuration-security-best-practices",
"/Configuration/configuration-security-best-practices",
],
},
{
to: "/environment-variables",
from: [
"/configuration-auto-saving",
"/Configuration/configuration-auto-saving",
"/configuration-backend-only",
"/Configuration/configuration-backend-only",
],
},
{
to: "/concepts-publish",
from: [
"/concepts-api",
"/workspace-api",
],
},
{
to: "/components-custom-components",
from: "/components/custom",
},
{
to: "/mcp-server",
from: "/integrations-mcp",
},
{
to: "/deployment-kubernetes-dev",
from: "/deployment-kubernetes",
},
{
to: "/contributing-github-issues",
from: "/contributing-github-discussions",
},
{
to: "/agents",
from: "/agents-tool-calling-agent-component",
},
{
to: "/concepts-publish",
from: "/embedded-chat-widget",
},
{
to: "/bundles-google",
from: [
"/integrations-setup-google-oauth-flow",
"/integrations-google-big-query",
],
},
{
to: "/bundles-vertexai",
from: "/integrations-setup-google-cloud-vertex-ai-flow",
},
{
to: "/develop-application",
from: "/develop-overview",
},
{
to: "/data-types",
from: "/concepts-objects",
},
{
to: "/bundles-apify",
from: "/integrations-apify",
},
{
to: "/bundles-assemblyai",
from: "/integrations-assemblyai",
},
{
to: "/bundles-cleanlab",
from: "/integrations-cleanlab",
},
{
to: "/bundles-composio",
from: "/integrations-composio",
},
{
to: "/bundles-docling",
from: "/integrations-docling",
},
{
to: "/bundles-notion",
from: [
"/integrations/notion/setup",
"/integrations/notion/notion-agent-meeting-notes",
"/integrations/notion/notion-agent-conversational",
],
},
{
to: "/bundles-nvidia",
from: [
"/integrations-nvidia-ingest-wsl2",
"/integrations-nvidia-ingest",
"/integrations-nvidia-g-assist",
"/integrations-nvidia-system-assist",
]
}
// add more redirects like this
// {
// to: '/docs/anotherpage',
// from: ['/docs/legacypage1', '/docs/legacypage2'],
// },
],
},
],
// ....
async function myPlugin(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
},
};
},
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
hideOnScroll: false,
logo: {
alt: "Flow",
src: "img/lf-docs-light.svg",
srcDark: "img/lf-docs-dark.svg",
},
items: [
{
type: 'docsVersionDropdown',
position: 'left',
},
// right
{
position: "right",
href: "https://github.com/flow-ai/flow",
className: "header-github-link",
target: "_blank",
rel: null,
"aria-label": "GitHub",
'data-event': 'UI Interaction',
'data-action': 'clicked',
'data-channel': 'docs',
'data-element-id': 'social-github',
'data-namespace': 'header',
'data-platform-title': 'Flow'
},
{
position: "right",
href: "https://twitter.com/flow_ai",
className: "header-twitter-link",
target: "_blank",
rel: null,
"aria-label": "Twitter",
'data-event': 'UI Interaction',
'data-action': 'clicked',
'data-channel': 'docs',
'data-element-id': 'social-twitter',
'data-namespace': 'header',
'data-platform-title': 'Flow'
},
{
position: "right",
href: "https://discord.gg/EqksyE2EX9",
className: "header-discord-link",
target: "_blank",
rel: null,
"aria-label": "Discord",
'data-event': 'UI Interaction',
'data-action': 'clicked',
'data-channel': 'docs',
'data-element-id': 'social-discord',
'data-namespace': 'header',
'data-platform-title': 'Flow'
},
],
},
colorMode: {
defaultMode: "light",
/* Allow users to chose light or dark mode. */
disableSwitch: false,
/* Respect user preferences, such as low light mode in the evening */
respectPrefersColorScheme: true,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
zoom: {
selector: ".markdown :not(a) > img:not(.no-zoom)",
background: {
light: "rgba(240, 240, 240, 0.9)",
},
config: {},
},
docs: {
sidebar: {
hideable: false,
autoCollapseCategories: false,
},
},
footer: {
links: [
{
title: null,
items: [
{
html: `<div class="footer-links">
<span>© ${new Date().getFullYear()} Flow</span>
</div>`,
},
],
},
],
},
algolia: {
appId: "UZK6BDPCVY",
// public key, safe to commit
apiKey: "adbd7686dceb1cd510d5ce20d04bf74c",
indexName: "flow",
contextualSearch: true,
searchParameters: {},
searchPagePath: "search",
},
}),
};
module.exports = config;