feat: HTML sitemap pages and footer link
- the module registers seo-sitemap-<locale> at seo.htmlSitemap.paths (defaults pl /mapa-strony, en /sitemap) and seo-sitemap-group-<locale> at <path>/:group (plus <path>/:group/<segment>/:page in the path form); a path an app page already has stays the app's - SeoHtmlSitemapPage (global, overridable): H1, an H2 per non-empty group, categories nested, a large group's link to its group page, sitemap.empty; group pages with a built trail, page suffix and <SeoPagination>; 404 for an unknown group or a page past the last, 301 for ?page=1, 503 when the sitemap API fails - GET /api/__seo__/sitemap proxies the sitemap plugin's HTML API (only while the CMS has the HTML sitemap on for the locale) - <SeoSitemapLink>: the footer link while the HTML sitemap is on - L3 default styles
This commit is contained in:
@@ -109,3 +109,35 @@ export interface SeoSiteAnswer {
|
||||
pagination?: { form?: 'query' | 'path'; param?: string; segments?: Record<string, string> }
|
||||
home_crumb?: { name?: string; url?: string } | null
|
||||
}
|
||||
|
||||
/** One link of the HTML sitemap (GET /_sitemap/api/v1/html); children nest the category tree. */
|
||||
export interface SeoSitemapEntry {
|
||||
title: string
|
||||
url: string
|
||||
children?: SeoSitemapEntry[]
|
||||
}
|
||||
|
||||
/** A group of the HTML sitemap overview. */
|
||||
export interface SeoSitemapGroup {
|
||||
key: string
|
||||
slug: string
|
||||
title: string
|
||||
total: number
|
||||
entries: SeoSitemapEntry[]
|
||||
/** True when the group has more than the overview lists: link its group page. */
|
||||
more: boolean
|
||||
}
|
||||
|
||||
/** The overview (GET /_sitemap/api/v1/html?locale=). */
|
||||
export interface SeoSitemapOverview {
|
||||
groups: SeoSitemapGroup[]
|
||||
}
|
||||
|
||||
/** One page of a group (GET /_sitemap/api/v1/html/{group}?locale=&page=). */
|
||||
export interface SeoSitemapGroupPage {
|
||||
group: string
|
||||
title: string
|
||||
page: number
|
||||
pages: number
|
||||
entries: SeoSitemapEntry[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user