@quintype/seo 1.40.0-author-schema.0 → 1.40.0-author-schema.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -612,10 +612,10 @@ function generateCommonData(structuredData = {}, story = {}, publisherConfig = {
612
612
 
613
613
  function authorData(authors = [], authorSchema = [], publisherConfig = {}) {
614
614
  if (authorSchema.length > 0) {
615
- return (authorSchema || []).map(author => getSchemaPerson(author.name, author.url));
615
+ return authorSchema.map(author => getSchemaPerson(author.name, author.url));
616
616
  }
617
617
  return authors.map(author => {
618
- const authorUrl = author.slug ? `${publisherConfig["sketches-host"]}/author/${author.slug}` : undefined;
618
+ const authorUrl = author.slug ? `${publisherConfig["sketches-host"]}/author/${author.slug}` : null;
619
619
  return getSchemaPerson(author.name, authorUrl);
620
620
  });
621
621
  }
@@ -894,7 +894,7 @@ function generateBreadcrumbListData(pageType = "", publisherConfig = {}, data =
894
894
  return story.authors.map((author)=>{
895
895
  return {
896
896
  name: author.name,
897
- url: `${config['sketches-host']}/authorsddc/${author.id}`
897
+ url: `${config['sketches-host']}/author/${author.id}`
898
898
  }
899
899
  })
900
900
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/seo",
3
- "version": "1.40.0-author-schema.0",
3
+ "version": "1.40.0-author-schema.1",
4
4
  "description": "SEO Modules for Quintype",
5
5
  "main": "dist/index.cjs.js",
6
6
  "repository": "https://github.com/quintype/quintype-node-seo",
@@ -61,10 +61,10 @@ function generateCommonData(structuredData = {}, story = {}, publisherConfig = {
61
61
 
62
62
  function authorData(authors = [], authorSchema = [], publisherConfig = {}) {
63
63
  if (authorSchema.length > 0) {
64
- return (authorSchema || []).map((author) => getSchemaPerson(author.name, author.url));
64
+ return authorSchema.map((author) => getSchemaPerson(author.name, author.url));
65
65
  }
66
66
  return authors.map((author) => {
67
- const authorUrl = author.slug ? `${publisherConfig["sketches-host"]}/author/${author.slug}` : undefined;
67
+ const authorUrl = author.slug ? `${publisherConfig["sketches-host"]}/author/${author.slug}` : null;
68
68
  return getSchemaPerson(author.name, authorUrl);
69
69
  });
70
70
  }
@@ -384,7 +384,7 @@ function generateBreadcrumbListData(pageType = "", publisherConfig = {}, data =
384
384
  return story.authors.map((author)=>{
385
385
  return {
386
386
  name: author.name,
387
- url: `${config['sketches-host']}/authorsddc/${author.id}`
387
+ url: `${config['sketches-host']}/author/${author.id}`
388
388
  }
389
389
  })
390
390
  }