From 795d5cbb2bf28cea857f598edeab4f70730fb326 Mon Sep 17 00:00:00 2001 From: Varun Date: Fri, 27 Mar 2026 11:58:28 +0530 Subject: [PATCH] Improve marketing SEO and docs metadata --- docs-site/astro.config.mjs | 1 + docs-site/public/favicon.svg | 4 + docs-site/public/robots.txt | 4 + docs-site/src/pages/index.astro | 35 +++++++ public/robots.txt | 1 + public/sitemap.xml | 10 -- scripts/generate-sitemap.js | 63 ++++++++++-- web/src/components/Layout.astro | 55 ++++++++--- .../landing/AnswerEngineSection.tsx | 96 +++++++++++++++++++ .../landing/ArchitectureExploded.tsx | 10 +- web/src/components/landing/Footer.tsx | 37 +++---- web/src/components/landing/LandingPage.tsx | 2 + web/src/components/landing/PricingSection.tsx | 2 +- web/src/pages/index.astro | 45 ++++++++- 14 files changed, 310 insertions(+), 55 deletions(-) create mode 100644 docs-site/public/favicon.svg create mode 100644 docs-site/public/robots.txt create mode 100644 web/src/components/landing/AnswerEngineSection.tsx diff --git a/docs-site/astro.config.mjs b/docs-site/astro.config.mjs index 34e6d251..412421f1 100644 --- a/docs-site/astro.config.mjs +++ b/docs-site/astro.config.mjs @@ -8,6 +8,7 @@ export default defineConfig({ starlight({ title: 'OpenFlowKit Docs', description: 'Documentation for OpenFlowKit — the local-first, AI-powered diagramming tool.', + favicon: '/favicon.svg', logo: { src: './src/assets/Logo_openflowkit.svg', alt: 'OpenFlowKit', diff --git a/docs-site/public/favicon.svg b/docs-site/public/favicon.svg new file mode 100644 index 00000000..dad9d55c --- /dev/null +++ b/docs-site/public/favicon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/docs-site/public/robots.txt b/docs-site/public/robots.txt new file mode 100644 index 00000000..10ebbb7a --- /dev/null +++ b/docs-site/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://docs.openflowkit.com/sitemap-index.xml diff --git a/docs-site/src/pages/index.astro b/docs-site/src/pages/index.astro index 8bf4647f..c9ce91a4 100644 --- a/docs-site/src/pages/index.astro +++ b/docs-site/src/pages/index.astro @@ -82,6 +82,41 @@ const referenceLinks = [ +
+
+ +

A local-first diagramming tool for editable technical workflows

+

+ OpenFlowKit is built for architecture diagrams, flowcharts, system design, structured + imports, and AI-assisted diagram drafting. The docs are written to help you choose the + right starting point quickly instead of reading the full navigation tree end to end. +

+
+
+
+

Use it when diagrams need to stay editable

+

+ OpenFlowKit is a better fit when you want to keep iterating in the canvas, work from + code-backed definitions, or export technical diagrams without flattening the workflow. +

+
+
+

Use AI as an assistant, not the whole workflow

+

+ The AI docs explain how prompting, refinement, and settings work so teams can use AI + intentionally instead of treating it like a one-shot image generator. +

+
+
+

Start from the job you need done

+

+ The fastest route is usually by workflow: architecture mapping, code-backed diagrams, + imports, exports, or editor fundamentals. +

+
+
+
+
diff --git a/public/robots.txt b/public/robots.txt index 93b65977..ee7c5af1 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -2,3 +2,4 @@ User-agent: * Allow: / Sitemap: https://openflowkit.com/sitemap.xml +Sitemap: https://docs.openflowkit.com/sitemap-index.xml diff --git a/public/sitemap.xml b/public/sitemap.xml index e9cefd6b..3aef4430 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -5,14 +5,4 @@ weekly 1.0 - - https://app.openflowkit.com/ - daily - 0.9 - - - https://docs.openflowkit.com/ - weekly - 0.8 - diff --git a/scripts/generate-sitemap.js b/scripts/generate-sitemap.js index 8c98dc55..d2035c9a 100644 --- a/scripts/generate-sitemap.js +++ b/scripts/generate-sitemap.js @@ -6,12 +6,62 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const OUTPUT_FILE = path.resolve(__dirname, '../public/sitemap.xml'); +const PAGES_DIR = path.resolve(__dirname, '../web/src/pages'); +const SITE_URL = 'https://openflowkit.com'; -const ROUTES = [ - { loc: 'https://openflowkit.com/', changefreq: 'weekly', priority: '1.0' }, - { loc: 'https://app.openflowkit.com/', changefreq: 'daily', priority: '0.9' }, - { loc: 'https://docs.openflowkit.com/', changefreq: 'weekly', priority: '0.8' }, -]; +const ROUTE_SUFFIXES = new Set(['.astro', '.md', '.mdx']); + +function toRoute(relativePath) { + const normalizedPath = relativePath.replace(/\\/g, '/'); + const withoutExtension = normalizedPath.replace(/\.(astro|md|mdx)$/u, ''); + + if (withoutExtension === 'index') { + return '/'; + } + + if (withoutExtension.endsWith('/index')) { + return `/${withoutExtension.slice(0, -'/index'.length)}/`; + } + + return `/${withoutExtension}/`; +} + +function collectRoutes(directory, relativeDirectory = '') { + const entries = fs.readdirSync(directory, { withFileTypes: true }); + + return entries.flatMap((entry) => { + const entryRelativePath = path.posix.join(relativeDirectory, entry.name); + const entryAbsolutePath = path.join(directory, entry.name); + + if (entry.isDirectory()) { + return collectRoutes(entryAbsolutePath, entryRelativePath); + } + + const extension = path.extname(entry.name); + const isStaticPage = + ROUTE_SUFFIXES.has(extension) && + !entryRelativePath.startsWith('api/') && + !entry.name.startsWith('['); + + if (!isStaticPage) { + return []; + } + + return [toRoute(entryRelativePath)]; + }); +} + +function buildRoutes() { + const discoveredRoutes = collectRoutes(PAGES_DIR); + + return Array.from(new Set(discoveredRoutes)) + .sort((left, right) => left.localeCompare(right)) + .map((route) => ({ + loc: new URL(route, SITE_URL).toString(), + changefreq: route === '/' ? 'weekly' : 'monthly', + priority: route === '/' ? '1.0' : '0.7', + })); +} function renderUrl({ loc, changefreq, priority }) { return [ @@ -24,10 +74,11 @@ function renderUrl({ loc, changefreq, priority }) { } function generateSitemap() { + const routes = buildRoutes(); const sitemap = [ '', '', - ...ROUTES.map(renderUrl), + ...routes.map(renderUrl), '', '', ].join('\n'); diff --git a/web/src/components/Layout.astro b/web/src/components/Layout.astro index abd95e74..1c36d8b3 100644 --- a/web/src/components/Layout.astro +++ b/web/src/components/Layout.astro @@ -4,11 +4,45 @@ import '../styles/global.css'; interface Props { title: string; description: string; + canonicalPath?: string; + schema?: Record | Array>; } -const { title, description } = Astro.props; +const { title, description, canonicalPath = '/', schema } = Astro.props; const siteUrl = 'https://openflowkit.com'; +const canonicalUrl = new URL(canonicalPath, siteUrl).toString(); const ogImage = `${siteUrl}/og-image.png`; +const baseSchemas = [ + { + '@context': 'https://schema.org', + '@type': 'SoftwareApplication', + name: 'OpenFlowKit', + description, + url: canonicalUrl, + applicationCategory: 'DesignApplication', + operatingSystem: 'Web', + offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' }, + license: 'https://opensource.org/licenses/MIT', + }, + { + '@context': 'https://schema.org', + '@type': 'Organization', + name: 'OpenFlowKit', + url: siteUrl, + logo: `${siteUrl}/Logo_openflowkit.svg`, + sameAs: ['https://github.com/Vrun-design/openflowkit'], + }, + { + '@context': 'https://schema.org', + '@type': 'WebSite', + name: 'OpenFlowKit', + url: siteUrl, + description: + 'Open-source, local-first AI diagramming for architecture diagrams, flowcharts, system design, and export workflows.', + }, +]; +const extraSchemas = schema ? (Array.isArray(schema) ? schema : [schema]) : []; +const schemas = [...baseSchemas, ...extraSchemas]; --- @@ -18,11 +52,12 @@ const ogImage = `${siteUrl}/og-image.png`; {title} - + - + + @@ -30,18 +65,8 @@ const ogImage = `${siteUrl}/og-image.png`; -