Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

Site: social share card (og:image) + OG/Twitter tags, robots, sitemap

nyblnetafe8ff0e9ab0
diff --git a/scripts/build-landing.mjs b/scripts/build-landing.mjs
index 91b73d5c..5cde7f1f 100644
--- a/scripts/build-landing.mjs
+++ b/scripts/build-landing.mjs
@@ -8,7 +8,7 @@
//
// node scripts/build-landing.mjs [outPath] (default: site/index.html)
-import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'
+import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
@@ -59,3 +59,13 @@ if (/__(FRAUNCES|INSTRUMENT|PH_[A-Z0-9]+|SHELL_KB)__/.test(html)) {
mkdirSync(dirname(out), { recursive: true })
writeFileSync(out, html)
console.log(`landing → ${out} (${Math.round(html.length / 1024)} KB, self-contained)`)
+
+// Static site-root assets that travel with the landing: the social share card
+// (og:image) plus robots/sitemap. Copied into the same directory as the page.
+const siteDir = dirname(out)
+for (const f of ['og.png', 'robots.txt', 'sitemap.xml']) {
+ const src = join(root, 'site-src', f)
+ if (!existsSync(src)) throw new Error(`missing site-src/${f}`)
+ copyFileSync(src, join(siteDir, f))
+}
+console.log(` + og.png, robots.txt, sitemap.xml → ${siteDir}`)
diff --git a/scripts/make-og.mjs b/scripts/make-og.mjs
new file mode 100644
index 00000000..aadacacb
--- /dev/null
+++ b/scripts/make-og.mjs
@@ -0,0 +1,78 @@
+#!/usr/bin/env node
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento/Suite authors
+// Compose the social share card (og:image) as a self-contained SVG, using the
+// SAME embedded typefaces as the deck/landing so it's on-brand. Writes an SVG;
+// it's rasterised to site-src/og.png in the browser (no CLI rasteriser is
+// installed) — see the companion step in the build notes. 1200x630 = the
+// canonical Open Graph / Twitter summary_large_image size.
+//
+// node scripts/make-og.mjs [outPath] (default: scripts/.cache/og.svg)
+
+import { mkdirSync, readFileSync, writeFileSync } from 'node:fs'
+import { dirname, join } from 'node:path'
+import { fileURLToPath } from 'node:url'
+
+const root = dirname(dirname(fileURLToPath(import.meta.url)))
+const out = process.argv[2] ?? join(root, 'scripts/.cache/og.svg')
+
+const fontSrc = readFileSync(join(root, 'slides/src/fontdata.ts'), 'utf8')
+const grab = (name) => {
+ const m = fontSrc.match(new RegExp(`export const ${name}\\s*=\\s*'(data:[^']+)'`))
+ if (!m) throw new Error(`${name} not found in fontdata.ts`)
+ return m[1]
+}
+const fraunces = grab('FRAUNCES_900')
+const instrument = grab('INSTRUMENT_VAR')
+
+// midnight & peach — the showcase palette, verbatim
+const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630">
+ <defs>
+ <style>
+ @font-face { font-family:'Fraunces'; font-weight:900; src:url(${fraunces}) format('woff2'); }
+ @font-face { font-family:'Instrument Sans'; font-weight:100 900; src:url(${instrument}) format('woff2'); }
+ </style>
+ <radialGradient id="amber" cx="50%" cy="50%" r="50%">
+ <stop offset="0%" stop-color="#FF9E8A" stop-opacity="0.34"/>
+ <stop offset="60%" stop-color="#FF9E8A" stop-opacity="0.05"/>
+ <stop offset="72%" stop-color="#FF9E8A" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="blue" cx="50%" cy="50%" r="50%">
+ <stop offset="0%" stop-color="#5E7699" stop-opacity="0.40"/>
+ <stop offset="60%" stop-color="#5E7699" stop-opacity="0.06"/>
+ <stop offset="72%" stop-color="#5E7699" stop-opacity="0"/>
+ </radialGradient>
+ </defs>
+
+ <rect width="1200" height="630" fill="#0D1B2E"/>
+ <circle cx="1050" cy="70" r="420" fill="url(#amber)"/>
+ <circle cx="120" cy="640" r="380" fill="url(#blue)"/>
+
+ <!-- wordmark: logo tile + Bento/Suite -->
+ <g transform="translate(80,74)">
+ <rect width="52" height="52" rx="12" fill="#16273E"/>
+ <rect x="8" y="8" width="11" height="36" rx="4" fill="#5E7699"/>
+ <rect x="23" y="8" width="21" height="16" rx="4" fill="#FF9E8A"/>
+ <rect x="23" y="28" width="21" height="16" rx="4" fill="#F0EBE0"/>
+ <text x="70" y="35" font-family="Instrument Sans, sans-serif" font-weight="700" font-size="30" fill="#ffffff">Bento<tspan fill="#FF9E8A">/</tspan>Suite</text>
+ </g>
+
+ <!-- kicker -->
+ <text x="80" y="270" font-family="Instrument Sans, sans-serif" font-weight="700" font-size="21" letter-spacing="6" fill="#FF9E8A">LOCAL-FIRST · AI-NATIVE · E2EE</text>
+
+ <!-- headline -->
+ <text font-family="Fraunces, Georgia, serif" font-weight="900" font-size="86" fill="#ffffff" letter-spacing="-1">
+ <tspan x="80" y="360">The office suite</tspan>
+ <tspan x="80" y="452">that fits in <tspan fill="#FF9E8A">a file.</tspan></tspan>
+ </text>
+
+ <!-- sub -->
+ <text x="80" y="524" font-family="Instrument Sans, sans-serif" font-weight="500" font-size="27" fill="rgba(182,193,210,0.92)">One HTML file — the document, the editor and the player at once.</text>
+
+ <!-- domain -->
+ <text x="1120" y="566" text-anchor="end" font-family="Instrument Sans, sans-serif" font-weight="600" font-size="24" fill="rgba(182,193,210,0.75)">bento.page</text>
+</svg>`
+
+mkdirSync(dirname(out), { recursive: true })
+writeFileSync(out, svg)
+console.log(`og card → ${out} (${Math.round(svg.length / 1024)} KB SVG, fonts embedded)`)
diff --git a/site-src/help.html b/site-src/help.html
index 85cba51f..09e7984e 100644
--- a/site-src/help.html
+++ b/site-src/help.html
@@ -5,6 +5,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Help — Bento Slides — bento.page</title>
<meta name="description" content="How to use Bento Slides: elements, morph, charts, tables, media, presenting, live collaboration, building with AI, and keyboard shortcuts.">
+<link rel="canonical" href="https://bento.page/help">
+<meta name="theme-color" content="#0D1B2E">
+<meta property="og:type" content="article">
+<meta property="og:site_name" content="Bento/Suite">
+<meta property="og:url" content="https://bento.page/help">
+<meta property="og:title" content="Help — Bento Slides">
+<meta property="og:description" content="How to use Bento Slides: elements, morph, charts, tables, media, presenting, live collaboration, building with AI, and keyboard shortcuts.">
+<meta property="og:image" content="https://bento.page/og.png">
+<meta name="twitter:card" content="summary_large_image">
+<meta name="twitter:image" content="https://bento.page/og.png">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%2316273E'/%3E%3Crect x='5' y='5' width='7' height='22' rx='2.5' fill='%235E7699'/%3E%3Crect x='14' y='5' width='13' height='10' rx='2.5' fill='%23FF9E8A'/%3E%3Crect x='14' y='17' width='13' height='10' rx='2.5' fill='%23F0EBE0'/%3E%3C/svg%3E">
<style>
:root{
diff --git a/site-src/landing.html b/site-src/landing.html
index f3088d29..1dfb909e 100644
--- a/site-src/landing.html
+++ b/site-src/landing.html
@@ -5,6 +5,22 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bento/Suite — the office suite that fits in a file</title>
<meta name="description" content="Bento/Suite: office documents that are single HTML files — data, viewer and editor together. Local-first, AI-native, end-to-end-encrypted live collaboration, works offline forever. Slides is here; Docs and Sheets are coming.">
+<link rel="canonical" href="https://bento.page/">
+<meta name="theme-color" content="#0D1B2E">
+<!-- social share card -->
+<meta property="og:type" content="website">
+<meta property="og:site_name" content="Bento/Suite">
+<meta property="og:url" content="https://bento.page/">
+<meta property="og:title" content="Bento/Suite — the office suite that fits in a file">
+<meta property="og:description" content="One HTML file is the document, the editor and the player at once. Local-first, AI-native, end-to-end-encrypted live collaboration, works offline forever.">
+<meta property="og:image" content="https://bento.page/og.png">
+<meta property="og:image:width" content="1200">
+<meta property="og:image:height" content="630">
+<meta property="og:image:alt" content="Bento/Suite — the office suite that fits in a file">
+<meta name="twitter:card" content="summary_large_image">
+<meta name="twitter:title" content="Bento/Suite — the office suite that fits in a file">
+<meta name="twitter:description" content="One HTML file is the document, the editor and the player at once. Local-first, AI-native, E2EE live collaboration, works offline forever.">
+<meta name="twitter:image" content="https://bento.page/og.png">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%2316273E'/%3E%3Crect x='5' y='5' width='7' height='22' rx='2.5' fill='%235E7699'/%3E%3Crect x='14' y='5' width='13' height='10' rx='2.5' fill='%23FF9E8A'/%3E%3Crect x='14' y='17' width='13' height='10' rx='2.5' fill='%23F0EBE0'/%3E%3C/svg%3E">
<style>
/* ————— Faces: the SAME type that travels inside every deck ————— */
diff --git a/site-src/og.png b/site-src/og.png
new file mode 100644
index 00000000..ca6986e9
Binary files /dev/null and b/site-src/og.png differ
diff --git a/site-src/robots.txt b/site-src/robots.txt
new file mode 100644
index 00000000..7490cfee
--- /dev/null
+++ b/site-src/robots.txt
@@ -0,0 +1,4 @@
+User-agent: *
+Allow: /
+
+Sitemap: https://bento.page/sitemap.xml
diff --git a/site-src/sitemap.xml b/site-src/sitemap.xml
new file mode 100644
index 00000000..0ea382d4
--- /dev/null
+++ b/site-src/sitemap.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.w3.org/2000/sitemap/0.9">
+ <url><loc>https://bento.page/</loc><changefreq>weekly</changefreq><priority>1.0</priority></url>
+ <url><loc>https://bento.page/help</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>
+ <url><loc>https://bento.page/agents.md</loc><changefreq>monthly</changefreq><priority>0.6</priority></url>
+ <url><loc>https://bento.page/guestbook/</loc><changefreq>daily</changefreq><priority>0.5</priority></url>
+</urlset>