MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / buildStructureData

Function buildStructureData

apps/web/utilities/seo/buildStructureData.tsx:46–71  ·  view source on GitHub ↗
({
  thread,
  isSubDomainRouting,
  settings,
}: {
  thread?: SerializedThread;
  isSubDomainRouting: boolean;
  settings: Settings;
})

Source from the content-addressed store, hash-verified

44}
45
46export function buildStructureData({
47 thread,
48 isSubDomainRouting,
49 settings,
50}: {
51 thread?: SerializedThread;
52 isSubDomainRouting: boolean;
53 settings: Settings;
54}) {
55 if (!thread) return <></>;
56
57 const url = buildUrl(isSubDomainRouting, settings, thread);
58 const data = buildNameText(thread, url);
59
60 if (!data.name) return <></>;
61
62 return (
63 <QAPageJsonLd
64 keyOverride={thread.incrementId}
65 mainEntity={{
66 ...data,
67 }}
68 key={thread.incrementId}
69 />
70 );
71}

Callers 1

ThreadPageFunction · 0.90

Calls 2

buildUrlFunction · 0.90
buildNameTextFunction · 0.85

Tested by

no test coverage detected