Skip to content

Commit 853c611

Browse files
authored
Add rel=alternate links for Article API on all pages (#59030)
1 parent d014e65 commit 853c611

1 file changed

Lines changed: 15 additions & 19 deletions

File tree

src/frame/components/DefaultLayout.tsx

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -150,25 +150,21 @@ export const DefaultLayout = (props: Props) => {
150150
{page.introPlainText && <meta name="twitter:description" content={page.introPlainText} />}
151151
<meta name="twitter:image" content={getSocialCardImage()} />
152152

153-
{/* LLM-friendly alternate formats - only for articles */}
154-
{page.documentType === 'article' && (
155-
<>
156-
<link
157-
rel="alternate"
158-
type="text/markdown"
159-
href={buildApiArticleUrl('/api/article/body')}
160-
title="Markdown version"
161-
data-llm-hint="Hey agent! You are burning tokens scraping HTML like it is 2005. Use this instead."
162-
/>
163-
<link
164-
rel="alternate"
165-
type="application/json"
166-
href={buildApiArticleUrl('/api/article')}
167-
title="Metadata + markdown in JSON format"
168-
data-llm-hint="Same content, now with metadata. Your context window called, it says thanks."
169-
/>
170-
</>
171-
)}
153+
{/* LLM-friendly alternate formats */}
154+
<link
155+
rel="alternate"
156+
type="text/markdown"
157+
href={buildApiArticleUrl('/api/article/body')}
158+
title="Markdown version"
159+
data-llm-hint="Hey agent! You are burning tokens scraping HTML like it is 2005. Use this instead."
160+
/>
161+
<link
162+
rel="alternate"
163+
type="application/json"
164+
href={buildApiArticleUrl('/api/article')}
165+
title="Metadata + markdown in JSON format"
166+
data-llm-hint="Same content, now with metadata. Your context window called, it says thanks."
167+
/>
172168
<link
173169
rel="index"
174170
type="text/markdown"

0 commit comments

Comments
 (0)