Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breadcrumbs for custom pages #177

Open
sharangj opened this issue Apr 8, 2020 · 0 comments
Open

Breadcrumbs for custom pages #177

sharangj opened this issue Apr 8, 2020 · 0 comments
Assignees

Comments

@sharangj
Copy link
Contributor

sharangj commented Apr 8, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants