mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
fix(landing-page): correct SEO canonical, add robots.txt + favicons (#1061)
The Astro `site` default was `https://open-design.dev`, but the live Cloudflare Pages deployment is bound to `open-design.ai`. As a result every `<link rel="canonical">`, `og:url`, and sitemap entry pointed at the wrong origin, and search engines saw no robots.txt or favicon at the apex. - astro.config.ts: switch the default `site` to `https://open-design.ai` and document that `OD_LANDING_SITE` stays as the preview-deploy hatch. - astro.config.ts: filter `/og/` out of the sitemap; that route is the 1200x630 OG screenshot surface and already carries `noindex`. - public/robots.txt: allow-all + Disallow `/og/` + canonical sitemap URL. - public/favicon.svg: 32x32 SVG mark mirroring the on-page `Ø` brand glyph (ink ground, paper-stroked italic ellipse, coral slash). - public/apple-touch-icon.png: 180x180 PNG rendered from the same geometry without the rounded corners (iOS applies its own mask). - index.astro: link `/favicon.svg` (`type="image/svg+xml"`) and `/apple-touch-icon.png` from the document head. Verified locally with `pnpm --filter @open-design/landing-page build`: the rendered head emits `https://open-design.ai/` for canonical and `og:url`, the sitemap contains exactly the canonical `/` URL, and the two `landing-page-deploy.yml` verification scripts (no client JS, >=16 Cloudflare resized image URLs, no local /assets/*.png) still pass. Co-authored-by: joey <joey@joeydeMacBook-Air.local> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
cc343f8828
commit
0dfa922208
5 changed files with 41 additions and 2 deletions
|
|
@ -22,6 +22,9 @@ const pageHtml = renderToStaticMarkup(createElement(Page));
|
|||
<meta name="description" content={description} />
|
||||
<link rel="canonical" href={canonical} />
|
||||
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:site_name" content="Open Design" />
|
||||
<meta property="og:title" content={title} />
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
import sitemap from '@astrojs/sitemap';
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
const site = process.env.OD_LANDING_SITE ?? 'https://open-design.dev';
|
||||
// Production canonical origin. Used by Astro for `Astro.site`, by
|
||||
// `@astrojs/sitemap` for every URL it emits, and by `index.astro` to
|
||||
// build the `<link rel="canonical">` / `og:url` tags.
|
||||
//
|
||||
// `open-design.ai` is the live domain bound to the Cloudflare Pages
|
||||
// project (`open-design-landing`); the env override exists so preview
|
||||
// builds (Cloudflare Pages preview deployments, local previews on a
|
||||
// different host) can stamp their own URL without forking the config.
|
||||
const site = process.env.OD_LANDING_SITE ?? 'https://open-design.ai';
|
||||
|
||||
export default defineConfig({
|
||||
output: 'static',
|
||||
|
|
@ -9,5 +17,13 @@ export default defineConfig({
|
|||
srcDir: './app',
|
||||
outDir: './out',
|
||||
trailingSlash: 'always',
|
||||
integrations: [sitemap()],
|
||||
integrations: [
|
||||
sitemap({
|
||||
// `/og/` is a screenshot surface for the 1200x630 Open Graph
|
||||
// image — it already carries `<meta name="robots" content="noindex">`
|
||||
// and is `Disallow`-ed from `public/robots.txt`. Filtering it
|
||||
// out of the sitemap keeps the index strictly canonical pages.
|
||||
filter: (page) => !page.includes('/og/'),
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
|||
BIN
apps/landing-page/public/apple-touch-icon.png
Normal file
BIN
apps/landing-page/public/apple-touch-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
6
apps/landing-page/public/favicon.svg
Normal file
6
apps/landing-page/public/favicon.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" role="img" aria-label="Open Design">
|
||||
<title>Open Design</title>
|
||||
<rect width="32" height="32" rx="6" fill="#14110b"/>
|
||||
<ellipse cx="16" cy="16" rx="6.4" ry="8" fill="none" stroke="#efe7d2" stroke-width="2.4" transform="rotate(-12 16 16)"/>
|
||||
<line x1="9.5" y1="22.5" x2="22.5" y2="9.5" stroke="#ed6f5c" stroke-width="2.4" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 418 B |
14
apps/landing-page/public/robots.txt
Normal file
14
apps/landing-page/public/robots.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Open Design — landing page (https://open-design.ai/)
|
||||
#
|
||||
# This file is served verbatim from the apex of the Cloudflare Pages
|
||||
# deployment. The sitemap URL must match `astro.config.ts`'s `site`
|
||||
# value; @astrojs/sitemap emits the index at `/sitemap-index.xml`.
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
# The /og/ route is a screenshot surface for the Open Graph image
|
||||
# (1200x630). It already carries `<meta name="robots" content="noindex">`
|
||||
# but blocking the path here keeps it out of crawl budgets entirely.
|
||||
Disallow: /og/
|
||||
|
||||
Sitemap: https://open-design.ai/sitemap-index.xml
|
||||
Loading…
Reference in a new issue