feat(seo/geo): Dataset + Article + BreadcrumbList structured data, noindex archive

GEO (AI answer engines) — make the signal feeds and case studies machine-citeable:
- Dataset JSON-LD on /trump, /kol, /trades (creator=Endorphin, publisher→#org,
  isAccessibleForFree, temporalCoverage). These are the "data/history/track
  record" entities Perplexity/Gemini/ChatGPT cite.
- case-studies: ItemList of 5 Article nodes, each with headline/description/
  articleBody/about + citation→evidence URL + author=Endorphin. ISO dates
  derived where parseable, omitted for vague labels.
- public/llms-full.txt: single-doc full reference (methodology + glossary +
  case studies w/ sources inlined) for one-fetch AI ingestion; linked from llms.txt.

SEO:
- Breadcrumbs component (components/seo/Breadcrumbs.tsx) → BreadcrumbList JSON-LD
  on the 8 indexable content pages (trump/kol/macro/trades/analytics/
  methodology/glossary/case-studies).
- /archive split into server page + ArchivePageClient; server page sets
  robots noindex (legacy/test data — thin-content risk).
- openGraph added to /trades and /analytics (previously meta+canonical only).

Verified: tsc 0 errors, next build passes, runtime curl confirms all JSON-LD
types render and llms-full.txt serves 200. No trading/API/component-logic changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
k
2026-05-30 03:08:59 +08:00
parent f8805f5ba6
commit aa6ede051e
13 changed files with 443 additions and 133 deletions
+8 -1
View File
@@ -1,6 +1,7 @@
import type { Metadata } from 'next'
import { getLocale } from 'next-intl/server'
import AnalyticsPageClient from './AnalyticsPageClient'
import Breadcrumbs from '@/components/seo/Breadcrumbs'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
@@ -14,6 +15,7 @@ export async function generateMetadata(): Promise<Metadata> {
return {
title,
description,
openGraph: { title, description },
alternates: {
canonical: `${siteUrl}/en/analytics`,
languages: {
@@ -24,5 +26,10 @@ export async function generateMetadata(): Promise<Metadata> {
}
export default function AnalyticsPage() {
return <AnalyticsPageClient />
return (
<>
<Breadcrumbs items={[{ name: 'Analytics', path: '/en/analytics' }]} />
<AnalyticsPageClient />
</>
)
}
+121
View File
@@ -0,0 +1,121 @@
'use client'
import { useState, useEffect, useMemo } from 'react'
import { useLocale } from 'next-intl'
import type { TrumpPost } from '@/types'
import { getPosts } from '@/lib/api'
import PostRow from '@/components/dashboard/PostCards'
import PageHint from '@/components/ui/PageHint'
import Pagination from '@/components/ui/Pagination'
const ARCHIVE_PAGE_SIZE = 30
const LIVE_SOURCES = new Set([
'truth',
'btc_bottom_reversal',
'funding_reversal',
'kol_divergence',
])
/**
* Archive — legacy / test signals (rsi_reversal, sma_reclaim, breakout,
* test, phase1…). NOT a live system. Kept only so old data is inspectable.
*/
export default function ArchivePageClient() {
const locale = useLocale()
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
const [posts, setPosts] = useState<TrumpPost[]>([])
const [loading, setLoading] = useState(true)
const [loadErr, setLoadErr] = useState('')
const [src, setSrc] = useState<string>('all')
const [archivePage, setArchivePage] = useState(1)
useEffect(() => {
getPosts(500, 1)
.then(p => { setPosts(p); setLoadErr('') })
.catch(e => setLoadErr(e instanceof Error ? e.message : (isZh ? '历史归档加载失败' : 'Failed to load archive')))
.finally(() => setLoading(false))
}, [isZh])
// Archive = legacy / test data only. Exclude every live signal source so
// active modules don't leak in here as users explore old experiments. Keep
// this set in sync with sources emitted by app/services/scanners/*.
const archivePosts = useMemo(
() => posts.filter(p => !LIVE_SOURCES.has(p.source || '')),
[posts],
)
const sources = useMemo(() => {
const m: Record<string, number> = {}
for (const p of archivePosts) m[p.source || '?'] = (m[p.source || '?'] || 0) + 1
return Object.entries(m).sort((a, b) => b[1] - a[1])
}, [archivePosts])
const filtered = useMemo(
() => src === 'all' ? archivePosts : archivePosts.filter(p => p.source === src),
[archivePosts, src],
)
const archiveTotalPages = Math.max(1, Math.ceil(filtered.length / ARCHIVE_PAGE_SIZE))
const archiveSafePage = Math.min(archivePage, archiveTotalPages)
const archivePageItems = filtered.slice((archiveSafePage - 1) * ARCHIVE_PAGE_SIZE, archiveSafePage * ARCHIVE_PAGE_SIZE)
return (
<div className="page">
<div className="page-head">
<div>
<h1 className="page-title">Archive</h1>
<PageHint count={`${archivePosts.length} legacy posts`}>
Historical fires from old scanner experiments
(rsi_reversal, sma_reclaim, breakout, test/phase1). Kept only for
inspection the bot doesn't act on these any more.
</PageHint>
</div>
</div>
<div style={{ display: 'flex', gap: 6, flexWrap: 'wrap', marginBottom: 12 }}>
{[['all', archivePosts.length] as [string, number], ...sources].map(([s, n]) => (
<button
key={s}
onClick={() => { setSrc(s); setArchivePage(1) }}
style={{
padding: '4px 10px', borderRadius: 6, border: '1px solid var(--line)',
background: src === s ? 'var(--ink)' : 'transparent',
color: src === s ? 'var(--bg)' : 'var(--ink-3)',
fontSize: 11, cursor: 'pointer', fontWeight: src === s ? 600 : 400,
}}
>
{s} <span style={{ opacity: 0.6 }}>{n}</span>
</button>
))}
</div>
{loading && <div style={{ textAlign: 'center', padding: 60, color: 'var(--ink-3)' }}>{isZh ? '' : 'Loading'}</div>}
{!loading && loadErr && (
<div className="card" style={{ padding: 24, textAlign: 'center', color: 'var(--down)' }}>
⚠️ {isZh ? `无法加载归档:${loadErr}` : `Couldn't load archive ${loadErr}`}
<div style={{ marginTop: 10 }}>
<button className="btn ghost" style={{ fontSize: 12, padding: '6px 14px' }}
onClick={() => location.reload()}>{isZh ? '重试' : 'Retry'}</button>
</div>
</div>
)}
{!loading && !loadErr && filtered.length === 0 && (
<div className="card" style={{ padding: 48, textAlign: 'center', color: 'var(--ink-3)' }}>
{isZh ? '没有可显示的历史信号。' : 'No archived signals.'}
</div>
)}
{!loading && archivePageItems.length > 0 && (
<>
<div className="post-stream">
{archivePageItems.map(p => <PostRow key={p.id} post={p} />)}
</div>
<Pagination
page={archiveSafePage}
total={archiveTotalPages}
count={filtered.length}
pageSize={ARCHIVE_PAGE_SIZE}
onChange={setArchivePage}
/>
</>
)}
</div>
)
}
+11 -119
View File
@@ -1,121 +1,13 @@
'use client'
// Archive is legacy/test data only — not part of the live signal stack.
// noindex keeps it out of search results (duplicate/thin content risk)
// while keeping it accessible to logged-in users for inspection.
import type { Metadata } from 'next'
import ArchivePageClient from './ArchivePageClient'
import { useState, useEffect, useMemo } from 'react'
import { useLocale } from 'next-intl'
import type { TrumpPost } from '@/types'
import { getPosts } from '@/lib/api'
import PostRow from '@/components/dashboard/PostCards'
import PageHint from '@/components/ui/PageHint'
import Pagination from '@/components/ui/Pagination'
const ARCHIVE_PAGE_SIZE = 30
const LIVE_SOURCES = new Set([
'truth',
'btc_bottom_reversal',
'funding_reversal',
'kol_divergence',
])
/**
* Archive — legacy / test signals (rsi_reversal, sma_reclaim, breakout,
* test, phase1…). NOT a live system. Kept only so old data is inspectable.
*/
export default function ArchivePage() {
const locale = useLocale()
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
const [posts, setPosts] = useState<TrumpPost[]>([])
const [loading, setLoading] = useState(true)
const [loadErr, setLoadErr] = useState('')
const [src, setSrc] = useState<string>('all')
const [archivePage, setArchivePage] = useState(1)
useEffect(() => {
getPosts(500, 1)
.then(p => { setPosts(p); setLoadErr('') })
.catch(e => setLoadErr(e instanceof Error ? e.message : (isZh ? '历史归档加载失败' : 'Failed to load archive')))
.finally(() => setLoading(false))
}, [isZh])
// Archive = legacy / test data only. Exclude every live signal source so
// active modules don't leak in here as users explore old experiments. Keep
// this set in sync with sources emitted by app/services/scanners/*.
const archivePosts = useMemo(
() => posts.filter(p => !LIVE_SOURCES.has(p.source || '')),
[posts],
)
const sources = useMemo(() => {
const m: Record<string, number> = {}
for (const p of archivePosts) m[p.source || '?'] = (m[p.source || '?'] || 0) + 1
return Object.entries(m).sort((a, b) => b[1] - a[1])
}, [archivePosts])
const filtered = useMemo(
() => src === 'all' ? archivePosts : archivePosts.filter(p => p.source === src),
[archivePosts, src],
)
const archiveTotalPages = Math.max(1, Math.ceil(filtered.length / ARCHIVE_PAGE_SIZE))
const archiveSafePage = Math.min(archivePage, archiveTotalPages)
const archivePageItems = filtered.slice((archiveSafePage - 1) * ARCHIVE_PAGE_SIZE, archiveSafePage * ARCHIVE_PAGE_SIZE)
return (
<div className="page">
<div className="page-head">
<div>
<h1 className="page-title">Archive</h1>
<PageHint count={`${archivePosts.length} legacy posts`}>
Historical fires from old scanner experiments
(rsi_reversal, sma_reclaim, breakout, test/phase1). Kept only for
inspection the bot doesn't act on these any more.
</PageHint>
</div>
</div>
<div style={{ display: 'flex', gap: 6, flexWrap: 'wrap', marginBottom: 12 }}>
{[['all', archivePosts.length] as [string, number], ...sources].map(([s, n]) => (
<button
key={s}
onClick={() => { setSrc(s); setArchivePage(1) }}
style={{
padding: '4px 10px', borderRadius: 6, border: '1px solid var(--line)',
background: src === s ? 'var(--ink)' : 'transparent',
color: src === s ? 'var(--bg)' : 'var(--ink-3)',
fontSize: 11, cursor: 'pointer', fontWeight: src === s ? 600 : 400,
}}
>
{s} <span style={{ opacity: 0.6 }}>{n}</span>
</button>
))}
</div>
{loading && <div style={{ textAlign: 'center', padding: 60, color: 'var(--ink-3)' }}>{isZh ? '' : 'Loading'}</div>}
{!loading && loadErr && (
<div className="card" style={{ padding: 24, textAlign: 'center', color: 'var(--down)' }}>
⚠️ {isZh ? `无法加载归档:${loadErr}` : `Couldnt load archive — ${loadErr}`}
<div style={{ marginTop: 10 }}>
<button className="btn ghost" style={{ fontSize: 12, padding: '6px 14px' }}
onClick={() => location.reload()}>{isZh ? '' : 'Retry'}</button>
</div>
</div>
)}
{!loading && !loadErr && filtered.length === 0 && (
<div className="card" style={{ padding: 48, textAlign: 'center', color: 'var(--ink-3)' }}>
{isZh ? '' : 'No archived signals.'}
</div>
)}
{!loading && archivePageItems.length > 0 && (
<>
<div className="post-stream">
{archivePageItems.map(p => <PostRow key={p.id} post={p} />)}
</div>
<Pagination
page={archiveSafePage}
total={archiveTotalPages}
count={filtered.length}
pageSize={ARCHIVE_PAGE_SIZE}
onChange={setArchivePage}
/>
</>
)}
</div>
)
export const metadata: Metadata = {
robots: { index: false, follow: false },
}
export default function ArchivePage() {
return <ArchivePageClient />
}
+48
View File
@@ -1,5 +1,6 @@
import type { Metadata } from 'next'
import Link from 'next/link'
import Breadcrumbs from '@/components/seo/Breadcrumbs'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
@@ -303,13 +304,60 @@ const SIGNAL_COLOR: Record<string, string> = {
DIVERGENCE: '#f5a524',
}
// Map a free-text case date ("March 2, 2025", "April 2025", "Illustrative
// composite") to an ISO date where possible. Returns undefined for vague /
// non-date labels so we omit datePublished rather than emit garbage.
function caseIsoDate(raw: string): string | undefined {
const d = new Date(raw)
return isNaN(d.getTime()) ? undefined : d.toISOString().slice(0, 10)
}
export default async function CaseStudiesPage({ params }: { params: Promise<{ locale: string }> }) {
const { locale } = await params
const copy = getCopy(locale)
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
// ── GEO: each case as a schema.org/Article in an ItemList ─────────────────
// These documented event walkthroughs are exactly what AI answer engines
// (Perplexity, Gemini, ChatGPT) cite for "did Trump posts move crypto"
// queries. Structured data makes them machine-citeable. Evidence URLs become
// citation links; Endorphin is the author/publisher.
const pageUrl = `${siteUrl}/${locale}/case-studies`
const caseJsonLd = {
'@context': 'https://schema.org',
'@type': 'ItemList',
'@id': `${pageUrl}#cases`,
name: copy.title,
description: copy.description,
itemListElement: copy.cases.map((c, i) => {
const iso = caseIsoDate(c.date)
const article: Record<string, unknown> = {
'@type': 'Article',
'@id': `${pageUrl}#${c.id}`,
headline: c.title,
description: c.summary,
articleBody: c.detail,
about: c.asset,
author: { '@type': 'Organization', name: 'Endorphin', url: siteUrl },
publisher: { '@id': `${siteUrl}/#org` },
isPartOf: { '@id': `${siteUrl}/#website` },
}
if (iso) article.datePublished = iso
if (c.externalUrl) {
article.citation = c.externalUrl
article.isBasedOn = c.externalUrl
}
return { '@type': 'ListItem', position: i + 1, item: article }
}),
}
return (
<div className="page" style={{ maxWidth: 780 }}>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(caseJsonLd) }}
/>
<Breadcrumbs items={[{ name: copy.heroTitle, path: `/${locale}/case-studies` }]} />
<div className="page-head">
<div>
<h1 className="page-title">{copy.heroTitle}</h1>
+2
View File
@@ -1,5 +1,6 @@
import type { Metadata } from 'next'
import Link from 'next/link'
import Breadcrumbs from '@/components/seo/Breadcrumbs'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
@@ -357,6 +358,7 @@ export default async function GlossaryPage({ params }: { params: Promise<{ local
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(glossaryJsonLd) }}
/>
<Breadcrumbs items={[{ name: copy.heroTitle, path: `/${locale}/glossary` }]} />
<div className="page" style={{ maxWidth: 760 }}>
<div className="page-head">
<div>
+33 -6
View File
@@ -1,6 +1,7 @@
import { getKolChanges, getKolDigest, getKolDivergence, getKolPosts } from '@/lib/api'
import type { Metadata } from 'next'
import KolPageClient from './KolPageClient'
import Breadcrumbs from '@/components/seo/Breadcrumbs'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
export const revalidate = 30
@@ -59,6 +60,25 @@ export async function generateMetadata({
}
}
// GEO: the KOL talks-vs-trades feed is a dataset cross-referencing 19 crypto
// KOLs' public statements against their on-chain wallet behaviour.
const kolDataset = {
'@context': 'https://schema.org',
'@type': 'Dataset',
'@id': `${siteUrl}/en/kol#dataset`,
name: 'Crypto KOL talks-vs-trades divergence dataset',
description:
'Daily cross-reference of 19 crypto KOLs\' public statements (Substack / podcast) against their on-chain Ethereum wallet activity, flagging divergence when public stance and real positioning disagree within a ±7-day window.',
url: `${siteUrl}/en/kol`,
keywords: ['crypto KOL', 'on-chain', 'divergence', 'wallet tracking', 'sentiment'],
isAccessibleForFree: true,
creator: { '@type': 'Organization', name: 'Endorphin', url: siteUrl },
publisher: { '@id': `${siteUrl}/#org` },
license: `${siteUrl}/en/terms`,
measurementTechnique: 'On-chain wallet diff vs NLP stance extraction',
temporalCoverage: '2025-01-01/..',
}
export default async function KolPage() {
const [posts, digest, changes, divergence] = await Promise.all([
getKolPosts({ limit: 100 }).catch(() => null),
@@ -68,11 +88,18 @@ export default async function KolPage() {
])
return (
<KolPageClient
initialPosts={posts?.items ?? null}
initialDigest={digest}
initialChanges={changes?.changes ?? null}
initialDivergence={divergence?.items ?? null}
/>
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(kolDataset) }}
/>
<Breadcrumbs items={[{ name: 'KOL talks-vs-trades', path: '/en/kol' }]} />
<KolPageClient
initialPosts={posts?.items ?? null}
initialDigest={digest}
initialChanges={changes?.changes ?? null}
initialDivergence={divergence?.items ?? null}
/>
</>
)
}
+8 -4
View File
@@ -1,6 +1,7 @@
import { getFundingSnapshot, getPosts } from '@/lib/api'
import type { Metadata } from 'next'
import MacroVibesPageClient from './MacroVibesPageClient'
import Breadcrumbs from '@/components/seo/Breadcrumbs'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
export const revalidate = 30
@@ -68,9 +69,12 @@ export default async function MacroVibesPage() {
])
return (
<MacroVibesPageClient
initialPosts={posts}
initialFundingSnapshot={fundingSnapshot}
/>
<>
<Breadcrumbs items={[{ name: 'Macro Vibes', path: '/en/macro' }]} />
<MacroVibesPageClient
initialPosts={posts}
initialFundingSnapshot={fundingSnapshot}
/>
</>
)
}
+2
View File
@@ -1,5 +1,6 @@
import type { Metadata } from 'next'
import Link from 'next/link'
import Breadcrumbs from '@/components/seo/Breadcrumbs'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
@@ -468,6 +469,7 @@ export default async function MethodologyPage({ params }: { params: Promise<{ lo
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(methodologyJsonLd) }}
/>
<Breadcrumbs items={[{ name: copy.heroTitle, path: `/${locale}/methodology` }]} />
<div className="page" style={{ maxWidth: 760 }}>
<div className="page-head">
<div>
+32 -2
View File
@@ -1,6 +1,7 @@
import type { Metadata } from 'next'
import { getLocale } from 'next-intl/server'
import TradesPageClient from './TradesPageClient'
import Breadcrumbs from '@/components/seo/Breadcrumbs'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
@@ -14,6 +15,7 @@ export async function generateMetadata(): Promise<Metadata> {
return {
title,
description,
openGraph: { title, description },
alternates: {
canonical: `${siteUrl}/${locale}/trades`,
languages: {
@@ -23,6 +25,34 @@ export async function generateMetadata(): Promise<Metadata> {
}
}
export default function TradesPage() {
return <TradesPageClient />
// GEO: the trade history is a dataset — every bot execution with entry/exit,
// P&L, hold time, and the signal that triggered it. Cited for "track record"
// and "does it work" queries.
const tradesDataset = {
'@context': 'https://schema.org',
'@type': 'Dataset',
'@id': `${siteUrl}/en/trades#dataset`,
name: 'Trump Alpha trade execution history',
description:
'Record of every signal-triggered trade: asset, direction, entry and exit price, realised P&L, hold time, and the source signal that triggered it. Public and timestamped.',
url: `${siteUrl}/en/trades`,
keywords: ['crypto trading track record', 'Hyperliquid', 'P&L', 'backtest', 'signal performance'],
isAccessibleForFree: true,
creator: { '@type': 'Organization', name: 'Endorphin', url: siteUrl },
publisher: { '@id': `${siteUrl}/#org` },
license: `${siteUrl}/en/terms`,
temporalCoverage: '2025-01-01/..',
}
export default function TradesPage() {
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(tradesDataset) }}
/>
<Breadcrumbs items={[{ name: 'Trades', path: '/en/trades' }]} />
<TradesPageClient />
</>
)
}
+31 -1
View File
@@ -1,6 +1,7 @@
import { getPosts } from '@/lib/api'
import type { Metadata } from 'next'
import TrumpPageClient from './TrumpPageClient'
import Breadcrumbs from '@/components/seo/Breadcrumbs'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
export const revalidate = 30
@@ -53,8 +54,37 @@ export async function generateMetadata({
}
}
// GEO: the live Trump signal feed is a dataset. schema.org/Dataset is highly
// cited by AI answer engines for "data / history of X" queries. Endorphin is
// the creator; the feed is free and continuously updated.
const trumpDataset = {
'@context': 'https://schema.org',
'@type': 'Dataset',
'@id': `${siteUrl}/en/trump#dataset`,
name: 'Trump Truth Social crypto-signal feed',
description:
'Time-stamped feed of Donald Trump Truth Social posts classified for crypto market impact (long / short / noise) with a confidence score and the realised short-term price move. Updated within seconds of each post.',
url: `${siteUrl}/en/trump`,
keywords: ['Trump', 'Truth Social', 'Bitcoin', 'crypto signal', 'sentiment'],
isAccessibleForFree: true,
creator: { '@type': 'Organization', name: 'Endorphin', url: siteUrl },
publisher: { '@id': `${siteUrl}/#org` },
license: `${siteUrl}/en/terms`,
measurementTechnique: 'NLP sentiment classification with confidence scoring',
temporalCoverage: '2025-01-01/..',
}
export default async function TrumpPage() {
const posts = await getPosts(500, 1).catch(() => null)
return <TrumpPageClient initialPosts={posts} />
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(trumpDataset) }}
/>
<Breadcrumbs items={[{ name: 'Trump signals', path: '/en/trump' }]} />
<TrumpPageClient initialPosts={posts} />
</>
)
}