mirror of
https://github.com/Luchexx/wacrm.git
synced 2026-11-02 17:29:45 +00:00
Re-applies the original SEO work from PR #47 that was reverted in PR #54 because its opengraph-image.tsx crashed `next build` during static prerender of /opengraph-image. Satori (next/og's renderer) errored with: Error: Expected <div> to have explicit "display: flex", "display: contents", or "display: none" if it has more than one child node. Failed to load dynamic font for ✓ . Status: 400 Root cause in the OG image JSX: - Several <div>s held text + a sibling element (e.g. "Run your WhatsApp business from <span>one inbox.</span>") without an explicit display value. Satori requires it whenever there is more than one child. - The ✓ Unicode glyph isn't covered by the default font Satori loads, so next/og tried to download a dynamic font and failed. Fix: - Every <div> with more than one child now has display: flex. - Multi-span headline sits in a flex-wrap row of two <span>s. - ✓ replaced with plain text dot separators in the feature row. Verified end-to-end: `npm run build` now completes with 27/27 pages prerendered, /opengraph-image among them. All the other SEO-pass content is identical to the originally merged-and-reverted work: metadataBase + title template, OpenGraph + Twitter Cards defaults, JSON-LD (WebSite + Organization + SoftwareApplication + FAQPage), sitemap.ts, robots.ts, noindex on auth + dashboard route-group layouts, shared faq-data + site-config modules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
36 lines
883 B
TypeScript
36 lines
883 B
TypeScript
import type { MetadataRoute } from 'next'
|
|
import { SITE_URL } from '@/lib/seo/site-config'
|
|
|
|
/**
|
|
* robots.txt served at /robots.txt. We explicitly disallow every
|
|
* gated area so crawlers don't spend their budget on pages they'll
|
|
* bounce off. Auth pages are closed off too — no SEO value, and
|
|
* we don't want "Sign in to WaCRM" competing with the landing page
|
|
* in SERPs.
|
|
*/
|
|
export default function robots(): MetadataRoute.Robots {
|
|
return {
|
|
rules: [
|
|
{
|
|
userAgent: '*',
|
|
allow: '/',
|
|
disallow: [
|
|
'/api/',
|
|
'/dashboard',
|
|
'/inbox',
|
|
'/contacts',
|
|
'/pipelines',
|
|
'/broadcasts',
|
|
'/automations',
|
|
'/settings',
|
|
'/login',
|
|
'/signup',
|
|
'/forgot-password',
|
|
],
|
|
},
|
|
],
|
|
sitemap: `${SITE_URL}/sitemap.xml`,
|
|
host: SITE_URL,
|
|
}
|
|
}
|