Open
Description
Problem
Any publisher using quintype-node-seo should be able to construct custom breadcrumbs for a page. The breadcrumbs are restricted to story-page
and section-page
for now. Refer this.
Proposal
We need to introduce another option which is passed from the load-data
function of the publisher using quintype-node-seo
.
For example, If a publisher returns a new variable called breadcrumbs
in load-data
:
return {
collection: collectionAsJson,
cacheKeys: collection ? collection.cacheKeys(config["publisher-id"]) : null,
title: "page title",
breadcrumbs: [{name: "Custom Page", url: "http://example.com/custom-page"}]
}
generateBreadcrumbListData
should be able to consume the breadcrumb
key passed in the data
parameter and it should return the breadcrumb list by doing something like this breadcrumbsDataList.concat(data.breadcrumbs)
. This can be the breadcrumbs for that particular page irrespective of whether page is passed or not.
Acceptance Criteria
- Please write tests in the corresponding test file.
- Please make sure the documentation is updated here.
- Breadcrumbs are tested with structured data testing tool
Metadata
Assignees
Labels
No labels