SEO: multilingual homepage (homeSlug per locale in path/sitemap), Article + llms.txt generators, siteDescription fallback, composeTitle dedup
This commit is contained in:
+44
-1
@@ -841,4 +841,47 @@ const jsonLd = buildArticleJsonLd({
|
||||
})
|
||||
```
|
||||
|
||||
Dane z dokumentu/panelu. Google wymaga headline + dat dla rich result.
|
||||
Dane z dokumentu/panelu. Google wymaga headline + dat dla rich result.
|
||||
|
||||
## Fallback meta description (siteDescription)
|
||||
|
||||
Strona bez `meta.description` → plugin używa globalnego `siteDescription` z
|
||||
SiteSettings. Lepsze niż brak description (Google losowo wyciąga tekst ze strony).
|
||||
|
||||
- Pole **siteDescription** w SiteSettings → General (localized, textarea)
|
||||
- buildMetadata: `meta.description || siteDescription`
|
||||
- Redaktor wypełnia raz globalnie; strony bez własnego opisu dziedziczą
|
||||
|
||||
## llms.txt — opis strony dla agentów AI (GEO)
|
||||
|
||||
`buildLlmsTxt` generuje `/llms.txt` (standard llmstxt.org) — plik Markdown
|
||||
opisujący stronę dla agentów AI / crawlerów LLM. Na wzór buildRobots/sitemap:
|
||||
plugin zna nazwę, opis i strony, więc generuje automatycznie.
|
||||
|
||||
```ts
|
||||
// app/llms.txt/route.ts
|
||||
import { buildLlmsTxt } from '@intecion/ipal-kit'
|
||||
import { getCachedPayload } from '@/lib/content'
|
||||
import { i18nConfig } from '@/i18n.config'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export async function GET() {
|
||||
const body = await buildLlmsTxt({
|
||||
payload: await getCachedPayload(),
|
||||
config: i18nConfig,
|
||||
baseUrl: process.env.NEXT_PUBLIC_SERVER_URL!,
|
||||
})
|
||||
return new Response(body, {
|
||||
headers: { 'Content-Type': 'text/plain; charset=utf-8' },
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
Struktura: H1 (nazwa firmy), blockquote (siteDescription), lista stron jako
|
||||
linki Markdown z opisami. Dane z panelu (siteName, siteDescription, strony),
|
||||
pomija drafty i noindex. Poprawia widoczność w wyszukiwaniach AI (GEO —
|
||||
Generative Engine Optimization) i audytach „Agentic Browsing”.
|
||||
|
||||
Wymaga wypełnionego siteDescription i sensownych meta.description stron
|
||||
(inaczej llms.txt będzie ubogi).
|
||||
Reference in New Issue
Block a user