Add tagline and docs SEO infrastructure

Hero tagline: "It's not rocket science. (It's celestial mechanics.
But now it's just SQL.)" across README, index.mdx, and meta description.

Add astro-icon with Lucide icon set, astro-seo-meta, and
astro-opengraph-images (blackAndWhite preset, Inter font). Override
Starlight Head component to inject og:image and twitter card tags
with auto-generated 1200x630 PNG images for all 37 pages.
This commit is contained in:
Ryan Malloy 2026-02-17 03:48:14 -07:00
parent bcf460a6ff
commit 86a2e386b7
6 changed files with 2369 additions and 20 deletions

View File

@ -1,6 +1,6 @@
# pg_orbit # pg_orbit
Solar system computation for PostgreSQL. *It's not rocket science.* (It's celestial mechanics. But now it's just SQL.)
pg_orbit moves orbital mechanics inside your database. Track satellites, compute pg_orbit moves orbital mechanics inside your database. Track satellites, compute
planet positions, observe 19 planetary moons, predict Jupiter radio bursts, and planet positions, observe 19 planetary moons, predict Jupiter radio bursts, and

View File

@ -4,15 +4,19 @@ import tailwindcss from "@tailwindcss/vite";
import remarkMath from "remark-math"; import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex"; import rehypeKatex from "rehype-katex";
import mermaid from "astro-mermaid"; import mermaid from "astro-mermaid";
import icon from "astro-icon";
import opengraphImages, { presets } from "astro-opengraph-images";
import * as fs from "fs";
export default defineConfig({ export default defineConfig({
site: "https://pg-orbit.warehack.ing", site: "https://pg-orbit.warehack.ing",
integrations: [ integrations: [
icon(),
mermaid(), mermaid(),
starlight({ starlight({
title: "pg_orbit", title: "pg_orbit",
description: description:
"Solar system computation for PostgreSQL", "It's not rocket science. Celestial mechanics for PostgreSQL.",
favicon: "/favicon.svg", favicon: "/favicon.svg",
logo: { logo: {
src: "./src/assets/pg-orbit-logo.svg", src: "./src/assets/pg-orbit-logo.svg",
@ -39,6 +43,9 @@ export default defineConfig({
}, },
}, },
], ],
components: {
Head: "./src/components/Head.astro",
},
sidebar: [ sidebar: [
{ {
label: "Getting Started", label: "Getting Started",
@ -107,6 +114,29 @@ export default defineConfig({
}, },
], ],
}), }),
opengraphImages({
options: {
fonts: [
{
name: "Inter",
weight: 400,
style: "normal",
data: fs.readFileSync(
"node_modules/@fontsource/inter/files/inter-latin-400-normal.woff"
),
},
{
name: "Inter",
weight: 700,
style: "normal",
data: fs.readFileSync(
"node_modules/@fontsource/inter/files/inter-latin-700-normal.woff"
),
},
],
},
render: presets.blackAndWhite,
}),
], ],
markdown: { markdown: {

2318
docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,9 +12,14 @@
"@astrojs/starlight": "^0.37.6", "@astrojs/starlight": "^0.37.6",
"@fontsource/inter": "^5.0.0", "@fontsource/inter": "^5.0.0",
"@fontsource/jetbrains-mono": "^5.0.0", "@fontsource/jetbrains-mono": "^5.0.0",
"@iconify-json/lucide": "^1.2.91",
"astro": "^5.17.2", "astro": "^5.17.2",
"astro-icon": "^1.1.5",
"astro-mermaid": "^1.3.1", "astro-mermaid": "^1.3.1",
"astro-opengraph-images": "^1.14.3",
"astro-seo-meta": "^5.2.0",
"katex": "^0.16.28", "katex": "^0.16.28",
"react": "^19.2.4",
"rehype-katex": "^7.0.1", "rehype-katex": "^7.0.1",
"remark-math": "^6.0.0", "remark-math": "^6.0.0",
"sharp": "^0.33.0" "sharp": "^0.33.0"

View File

@ -0,0 +1,25 @@
---
/**
* Extends Starlight's built-in Head with OG image and Twitter card tags.
*
* Starlight already generates: og:title, og:type, og:url, og:locale,
* og:description, og:site_name, twitter:card, meta description.
*
* We add: og:image, twitter:image, twitter:title, twitter:description.
*/
import Default from "@astrojs/starlight/components/Head.astro";
import { getImagePath } from "astro-opengraph-images";
const route = Astro.locals.starlightRoute;
const title = route?.entry?.data?.title ?? "pg_orbit";
const description =
route?.entry?.data?.description ||
"It's not rocket science. Celestial mechanics for PostgreSQL.";
const ogImageUrl = getImagePath({ url: Astro.url, site: Astro.site });
---
<Default {...Astro.props}><slot /></Default>
<meta property="og:image" content={ogImageUrl} />
<meta name="twitter:image" content={ogImageUrl} />
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />

View File

@ -3,7 +3,7 @@ title: pg_orbit Documentation
description: Solar system computation for PostgreSQL description: Solar system computation for PostgreSQL
template: splash template: splash
hero: hero:
tagline: Track satellites, compute planet positions, observe 19 planetary moons, predict Jupiter radio bursts, and plan interplanetary trajectories — all from standard SQL. tagline: "It's not rocket science. (It's celestial mechanics. But now it's just SQL.)"
image: image:
file: ../../assets/hero-elephant-orbit.svg file: ../../assets/hero-elephant-orbit.svg
alt: PostgreSQL elephant orbiting a planet alt: PostgreSQL elephant orbiting a planet
@ -28,8 +28,9 @@ import { Card, CardGrid, LinkCard } from "@astrojs/starlight/components";
points, and topocentric observation — all as SQL functions. points, and topocentric observation — all as SQL functions.
</Card> </Card>
<Card title="Observe the solar system" icon="sun"> <Card title="Observe the solar system" icon="sun">
Eight planets via VSOP87, the Sun, the Moon via ELP2000-82B, 19 planetary Eight planets via VSOP87 (built-in) or optional JPL DE440/441 (~0.1
moons across Jupiter, Saturn, Uranus, and Mars. Stars from J2000 catalog milliarcsecond). The Sun, the Moon via ELP2000-82B, 19 planetary moons
across Jupiter, Saturn, Uranus, and Mars. Stars from J2000 catalog
coordinates. Comets and asteroids from Keplerian elements. coordinates. Comets and asteroids from Keplerian elements.
</Card> </Card>
<Card title="Predict radio bursts" icon="star"> <Card title="Predict radio bursts" icon="star">