Project-defined link styles, legal links from System Pages; audit catches content-keyed logic, Polish text in code, link fields in globals

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-16 13:11:08 +02:00
co-authored by Claude Opus 5.5
parent 0069b28941
commit 6a0fefdbae
13 changed files with 144 additions and 17 deletions
+10 -2
View File
@@ -7,7 +7,7 @@ import type { AnalyticsConfig } from '../analytics/types.js'
import type { ConsentTexts } from '../consent/texts.js'
import type { ArchiveEntries, ContentOption, ResolvedRoute } from '../content/index.js'
import type { I18nConfig } from '../i18n/index.js'
import type { LinkValue, NavItem, ResolvedLink, ResolveLinkHrefOptions } from '../links/index.js'
import type { LinkValue, NavItem, ResolvedLink, ResolveLinkHrefOptions, SystemLink } from '../links/index.js'
import type { CreateMcpRouteArgs } from '../mcp/createMcpRoute.js'
import type { FormNotificationTexts } from '../notifications/types.js'
import type { PageMetadata, RobotsOptions, RobotsRules, SitemapEntry, SitemapStyleOptions } from '../seo/index.js'
@@ -19,7 +19,7 @@ import { getArchiveEntries, resolveRoute as resolveRouteRaw } from '../content/i
import { MARKDOWN_PREFIX, markdownHref } from '../content/markdownNegotiation.js'
import { resolveRedirect as resolveRedirectRaw } from '../content/resolveRedirect.js'
import { createHealthRoute } from '../health/createHealthRoute.js'
import { homeSlugFrom, resolveLink as resolveLinkRaw, resolveNav as resolveNavRaw } from '../links/resolveNav.js'
import { homeSlugFrom, resolveLink as resolveLinkRaw, resolveNav as resolveNavRaw, resolveSystemLinks } from '../links/resolveNav.js'
import { createMcpRoute } from '../mcp/createMcpRoute.js'
import { getNotificationTexts } from '../notifications/getNotificationTexts.js'
import { buildOrganizationJsonLd, sameAsUrls } from '../seo/buildOrganizationJsonLd.js'
@@ -586,6 +586,13 @@ export function createContentHelpers({
const resolveNav = async (items: unknown, locale: string, options: { childrenField?: string; linkField?: string } = {}): Promise<NavItem[]> =>
resolveNavRaw(items, { ...(await getLinkOptions(locale)), ...options })
/**
* Legal links for the footer from Site Settings → System Pages — href and label
* (the page title) in this locale. Default roles: privacy policy, cookie policy, terms.
*/
const getSystemLinks = async (locale: string, roles?: readonly string[]): Promise<SystemLink[]> =>
resolveSystemLinks(await getSettings(locale), { ...(await getLinkOptions(locale)), ...(roles ? { roles } : {}) })
/** Old slug → its new URL (308), for the catch-all page before notFound(). */
const resolvePageRedirect = async (locale: string, segments: string[] | undefined): Promise<null | string> =>
resolveRedirectRaw({
@@ -683,6 +690,7 @@ export function createContentHelpers({
getPageJsonLd,
getSettings,
getSiteShell,
getSystemLinks,
healthRoute,
i18n,
indexNowKeyRoute,