Skip to content
Permalink
Browse files

docs: add api documentation to codebase

Now using API Extractor to automatically generate documentation.

Also added a check to see if the API has been changed by since the last
code change.
  • Loading branch information
ifiokjr committed Jan 8, 2020
1 parent 1c14777 commit 9c4e6827688808669df322b8e77faf2470ef79bf
Showing with 4,749 additions and 128 deletions.
  1. +2 −2 .github/PULL_REQUEST_TEMPLATE.md
  2. +3 −0 .github/workflows/ci.yml
  3. +3 −0 .gitignore
  4. +2 −0 .prettierignore
  5. +150 −90 README.md
  6. +340 −0 api-extractor.json
  7. +12 −0 docs/api/gatsby-plugin-next-seo.allseoprops.md
  8. +15 −0 docs/api/gatsby-plugin-next-seo.articlejsonld.md
  9. +13 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.authorname.md
  10. +13 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.authortype.md
  11. +13 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.body.md
  12. +13 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.datecreated.md
  13. +13 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.datemodified.md
  14. +20 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.datepublished.md
  15. +13 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.description.md
  16. +18 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.headline.md
  17. +20 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.images.md
  18. +18 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.keywords.md
  19. +34 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.md
  20. +30 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.overrides.md
  21. +13 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.publisherlogo.md
  22. +13 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.publishername.md
  23. +16 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.title.md
  24. +13 −0 docs/api/gatsby-plugin-next-seo.articlejsonldprops.url.md
  25. +32 −0 docs/api/gatsby-plugin-next-seo.baseseo.md
  26. +23 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.canonical.md
  27. +13 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.description.md
  28. +26 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.facebook.md
  29. +13 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.languagealternates.md
  30. +13 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.linktags.md
  31. +31 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.md
  32. +49 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.metatags.md
  33. +36 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.mobilealternate.md
  34. +37 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.nofollow.md
  35. +35 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.noindex.md
  36. +13 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.opengraph.md
  37. +13 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.title.md
  38. +32 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.titletemplate.md
  39. +20 −0 docs/api/gatsby-plugin-next-seo.baseseoprops.twitter.md
  40. +11 −0 docs/api/gatsby-plugin-next-seo.blogjsonld.md
  41. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.authorname.md
  42. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.authortype.md
  43. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.datemodified.md
  44. +20 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.datepublished.md
  45. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.description.md
  46. +18 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.headline.md
  47. +20 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.images.md
  48. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.issn.md
  49. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.keywords.md
  50. +34 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.md
  51. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.overrides.md
  52. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.posts.md
  53. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.publisherlogo.md
  54. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.publishername.md
  55. +16 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.title.md
  56. +13 −0 docs/api/gatsby-plugin-next-seo.blogjsonldprops.url.md
  57. +42 −0 docs/api/gatsby-plugin-next-seo.blogpostjsonld.md
  58. +20 −0 docs/api/gatsby-plugin-next-seo.blogpostjsonldprops.md
  59. +13 −0 docs/api/gatsby-plugin-next-seo.blogpostjsonldprops.overrides.md
  60. +13 −0 docs/api/gatsby-plugin-next-seo.blogpostjsonldprops.publisherlogo.md
  61. +13 −0 docs/api/gatsby-plugin-next-seo.blogpostjsonldprops.publishername.md
  62. +55 −0 docs/api/gatsby-plugin-next-seo.breadcrumbjsonld.md
  63. +13 −0 docs/api/gatsby-plugin-next-seo.breadcrumbjsonldprops.itemlistelements.md
  64. +19 −0 docs/api/gatsby-plugin-next-seo.breadcrumbjsonldprops.md
  65. +13 −0 docs/api/gatsby-plugin-next-seo.breadcrumbjsonldprops.overrides.md
  66. +11 −0 docs/api/gatsby-plugin-next-seo.contactpoint.areaserved.md
  67. +11 −0 docs/api/gatsby-plugin-next-seo.contactpoint.availablelanguage.md
  68. +11 −0 docs/api/gatsby-plugin-next-seo.contactpoint.contactoption.md
  69. +11 −0 docs/api/gatsby-plugin-next-seo.contactpoint.contacttype.md
  70. +22 −0 docs/api/gatsby-plugin-next-seo.contactpoint.md
  71. +11 −0 docs/api/gatsby-plugin-next-seo.contactpoint.telephone.md
  72. +16 −0 docs/api/gatsby-plugin-next-seo.corporatecontactjsonld.md
  73. +11 −0 docs/api/gatsby-plugin-next-seo.corporatecontactjsonldprops.contactpoint.md
  74. +11 −0 docs/api/gatsby-plugin-next-seo.corporatecontactjsonldprops.logo.md
  75. +20 −0 docs/api/gatsby-plugin-next-seo.corporatecontactjsonldprops.md
  76. +11 −0 docs/api/gatsby-plugin-next-seo.corporatecontactjsonldprops.url.md
  77. +11 −0 docs/api/gatsby-plugin-next-seo.coursejsonld.md
  78. +16 −0 docs/api/gatsby-plugin-next-seo.coursejsonldprops.coursename.md
  79. +13 −0 docs/api/gatsby-plugin-next-seo.coursejsonldprops.description.md
  80. +25 −0 docs/api/gatsby-plugin-next-seo.coursejsonldprops.md
  81. +13 −0 docs/api/gatsby-plugin-next-seo.coursejsonldprops.name.md
  82. +13 −0 docs/api/gatsby-plugin-next-seo.coursejsonldprops.overrides.md
  83. +13 −0 docs/api/gatsby-plugin-next-seo.coursejsonldprops.providername.md
  84. +13 −0 docs/api/gatsby-plugin-next-seo.coursejsonldprops.providerurl.md
  85. +13 −0 docs/api/gatsby-plugin-next-seo.defaultseoprops.dangerouslysetallpagestonofollow.md
  86. +13 −0 docs/api/gatsby-plugin-next-seo.defaultseoprops.dangerouslysetallpagestonoindex.md
  87. +13 −0 docs/api/gatsby-plugin-next-seo.defaultseoprops.defaultopengraphimageheight.md
  88. +13 −0 docs/api/gatsby-plugin-next-seo.defaultseoprops.defaultopengraphimagewidth.md
  89. +13 −0 docs/api/gatsby-plugin-next-seo.defaultseoprops.defaultopengraphvideoheight.md
  90. +13 −0 docs/api/gatsby-plugin-next-seo.defaultseoprops.defaultopengraphvideowidth.md
  91. +24 −0 docs/api/gatsby-plugin-next-seo.defaultseoprops.md
  92. +13 −0 docs/api/gatsby-plugin-next-seo.deferseoprops.defer.md
  93. +19 −0 docs/api/gatsby-plugin-next-seo.deferseoprops.md
  94. +30 −0 docs/api/gatsby-plugin-next-seo.gatsbyseo.md
  95. +12 −0 docs/api/gatsby-plugin-next-seo.gatsbyseopluginoptions.md
  96. +12 −0 docs/api/gatsby-plugin-next-seo.gatsbyseoprops.md
  97. +24 −0 docs/api/gatsby-plugin-next-seo.itemlistelements.item.md
  98. +20 −0 docs/api/gatsby-plugin-next-seo.itemlistelements.md
  99. +13 −0 docs/api/gatsby-plugin-next-seo.itemlistelements.name.md
  100. +13 −0 docs/api/gatsby-plugin-next-seo.itemlistelements.position.md
  101. +36 −0 docs/api/gatsby-plugin-next-seo.jsonld.md
  102. +13 −0 docs/api/gatsby-plugin-next-seo.jsonldprops.json.md
  103. +18 −0 docs/api/gatsby-plugin-next-seo.jsonldprops.md
  104. +13 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonld.md
  105. +13 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.address.md
  106. +13 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.description.md
  107. +13 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.geo.md
  108. +18 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.id.md
  109. +32 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.images.md
  110. +30 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.md
  111. +13 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.name.md
  112. +98 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.openinghours.md
  113. +13 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.overrides.md
  114. +21 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.pricerange.md
  115. +13 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.rating.md
  116. +13 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.telephone.md
  117. +16 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.type.md
  118. +13 −0 docs/api/gatsby-plugin-next-seo.localbusinessjsonldprops.url.md
  119. +11 −0 docs/api/gatsby-plugin-next-seo.localbusinesstype.md
  120. +31 −0 docs/api/gatsby-plugin-next-seo.logojsonld.md
  121. +20 −0 docs/api/gatsby-plugin-next-seo.logojsonldprops.logo.md
  122. +26 −0 docs/api/gatsby-plugin-next-seo.logojsonldprops.md
  123. +13 −0 docs/api/gatsby-plugin-next-seo.logojsonldprops.overrides.md
  124. +13 −0 docs/api/gatsby-plugin-next-seo.logojsonldprops.url.md
  125. +64 −0 docs/api/gatsby-plugin-next-seo.md
  126. +47 −0 docs/api/gatsby-plugin-next-seo.newsarticlejsonld.md
  127. +19 −0 docs/api/gatsby-plugin-next-seo.newsarticlejsonldprops.md
  128. +13 −0 docs/api/gatsby-plugin-next-seo.newsarticlejsonldprops.overrides.md
  129. +13 −0 docs/api/gatsby-plugin-next-seo.newsarticlejsonldprops.section.md
  130. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.article.md
  131. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.book.md
  132. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.defaultimageheight.md
  133. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.defaultimagewidth.md
  134. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.description.md
  135. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.images.md
  136. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.locale.md
  137. +32 −0 docs/api/gatsby-plugin-next-seo.opengraph.md
  138. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.profile.md
  139. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.site_name.md
  140. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.title.md
  141. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.type.md
  142. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.url.md
  143. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.video.md
  144. +13 −0 docs/api/gatsby-plugin-next-seo.opengraph.videos.md
  145. +11 −0 docs/api/gatsby-plugin-next-seo.opengrapharticle.authors.md
  146. +11 −0 docs/api/gatsby-plugin-next-seo.opengrapharticle.expirationtime.md
  147. +24 −0 docs/api/gatsby-plugin-next-seo.opengrapharticle.md
  148. +11 −0 docs/api/gatsby-plugin-next-seo.opengrapharticle.modifiedtime.md
  149. +11 −0 docs/api/gatsby-plugin-next-seo.opengrapharticle.publishedtime.md
  150. +11 −0 docs/api/gatsby-plugin-next-seo.opengrapharticle.section.md
  151. +11 −0 docs/api/gatsby-plugin-next-seo.opengrapharticle.tags.md
  152. +13 −0 docs/api/gatsby-plugin-next-seo.opengraphbook.authors.md
  153. +18 −0 docs/api/gatsby-plugin-next-seo.opengraphbook.isbn.md
  154. +22 −0 docs/api/gatsby-plugin-next-seo.opengraphbook.md
  155. +13 −0 docs/api/gatsby-plugin-next-seo.opengraphbook.releasedate.md
  156. +13 −0 docs/api/gatsby-plugin-next-seo.opengraphbook.tags.md
  157. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphimages.alt.md
  158. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphimages.height.md
  159. +22 −0 docs/api/gatsby-plugin-next-seo.opengraphimages.md
  160. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphimages.url.md
  161. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphimages.width.md
  162. +13 −0 docs/api/gatsby-plugin-next-seo.opengraphprofile.firstname.md
  163. +13 −0 docs/api/gatsby-plugin-next-seo.opengraphprofile.gender.md
  164. +13 −0 docs/api/gatsby-plugin-next-seo.opengraphprofile.lastname.md
  165. +22 −0 docs/api/gatsby-plugin-next-seo.opengraphprofile.md
  166. +13 −0 docs/api/gatsby-plugin-next-seo.opengraphprofile.username.md
  167. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideo.actors.md
  168. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideo.directors.md
  169. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideo.duration.md
  170. +25 −0 docs/api/gatsby-plugin-next-seo.opengraphvideo.md
  171. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideo.releasedate.md
  172. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideo.series.md
  173. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideo.tags.md
  174. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideo.writers.md
  175. +20 −0 docs/api/gatsby-plugin-next-seo.opengraphvideoactors.md
  176. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideoactors.profile.md
  177. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideoactors.role.md
  178. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideos.alt.md
  179. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideos.height.md
  180. +22 −0 docs/api/gatsby-plugin-next-seo.opengraphvideos.md
  181. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideos.url.md
  182. +11 −0 docs/api/gatsby-plugin-next-seo.opengraphvideos.width.md
  183. +18 −0 docs/api/gatsby-plugin-next-seo.productjsonld.md
  184. +13 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.aggregaterating.md
  185. +13 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.brand.md
  186. +13 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.description.md
  187. +18 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.gtin.md
  188. +18 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.gtin12.md
  189. +18 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.gtin13.md
  190. +18 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.gtin14.md
  191. +18 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.gtin8.md
  192. +34 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.images.md
  193. +36 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.md
  194. +13 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.mpn.md
  195. +13 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.name.md
  196. +13 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.offers.md
  197. +11 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.offerstype.md
  198. +13 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.overrides.md
  199. +16 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.productname.md
  200. +18 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.reviews.md
  201. +13 −0 docs/api/gatsby-plugin-next-seo.productjsonldprops.sku.md
  202. +13 −0 docs/api/gatsby-plugin-next-seo.twitter.cardtype.md
  203. +13 −0 docs/api/gatsby-plugin-next-seo.twitter.handle.md
  204. +21 −0 docs/api/gatsby-plugin-next-seo.twitter.md
  205. +13 −0 docs/api/gatsby-plugin-next-seo.twitter.site.md
  206. +11 −0 docs/api/gatsby-plugin-next-seo.twittercardtype.md
  207. +12 −0 docs/api/index.md
  208. +459 −0 docs/etc/gatsby-plugin-next-seo.api.md
  209. +6 −5 package.json
  210. +55 −0 scripts/generate-api-docs.js
  211. +0 −1 src/jsonld/__tests__/jsonld.test.tsx
  212. +8 −1 src/jsonld/article.tsx
  213. +1 −1 src/jsonld/blog.tsx
  214. +20 −16 src/jsonld/product.tsx
  215. +5 −0 src/jsonld/social-profile.tsx
  216. +2 −0 src/meta/base-seo.tsx
  217. +2 −0 src/meta/gatsby-seo.tsx
  218. +75 −4 src/types.ts
  219. +1 −0 tsconfig.lint.json
  220. +133 −8 yarn.lock
@@ -8,5 +8,5 @@

- [ ] I have read the [**contributing**](https://github.com/ifiokjr/gatsby-plugin-next-seo/blob/master/CONTRIBUTING.md) document.
- [ ] My code follows the code style of this project and `yarn fix` runs successfully.
- [ ] I have updated the documentation where necessary.
- [ ] New code is unit tested and all current tests pass when running `yarn test && yarn test:e2e` .
- [ ] I have run `yarn api:generate` and updated the README documentation where necessary.
- [ ] New code is unit tested and all current tests pass when running `yarn test && yarn test:e2e`.
@@ -50,6 +50,9 @@ jobs:
- name: build project
run: yarn build

- name: check api documentation is up to date
run: yarn api:check

- name: run gatsby build integration tests
run: yarn test:e2e
if: matrix.node-version == '12.x'
@@ -126,3 +126,6 @@ $RECYCLE.BIN/

# Windows shortcuts
*.lnk


temp
@@ -0,0 +1,2 @@
docs/api/*.md
docs/etc/**
240 README.md
@@ -11,46 +11,48 @@ This codebase was initially forked from the brilliant [next-seo](https://github.
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [gatsby-plugin-next-seo](#gatsby-plugin-next-seo)
- [Table of Contents](#table-of-contents)
- [Usage](#usage)
- [Setup](#setup)
- [Add Plugin to Gatsby Config](#add-plugin-to-gatsby-config)
- [Add SEO to Page](#add-seo-to-page)
- [A note on Twitter Tags](#a-note-on-twitter-tags)
- [Default SEO Configuration in Gatsby Config](#default-seo-configuration-in-gatsby-config)
- [GatsbySeo Options](#gatsbyseo-options)
- [Title Template](#title-template)
- [No Index](#no-index)
- [dangerouslySetAllPagesToNoIndex](#dangerouslysetallpagestonoindex)
- [No Follow](#no-follow)
- [dangerouslySetAllPagesToNoFollow](#dangerouslysetallpagestonofollow)
- [Twitter](#twitter)
- [facebook](#facebook)
- [Canonical URL](#canonical-url)
- [Alternate](#alternate)
- [Additional Meta Tags](#additional-meta-tags)
- [Open Graph](#open-graph)
- [Open Graph Examples](#open-graph-examples)
- [Basic Example](#basic-example)
- [Video Example](#video-example)
- [Article Example](#article-example)
- [Book Example](#book-example)
- [Profile Example](#profile-example)
- [JSON-LD](#json-ld)
- [Article](#article)
- [Breadcrumb](#breadcrumb)
- [Blog Post](#blog-post)
- [Course](#course)
- [Corporate Contact (Deprecated)](#corporate-contact-deprecated)
- [Local Business](#local-business)
- [Logo](#logo)
- [Product](#product)
- [Social Profile (Deprecated)](#social-profile-deprecated)
- [News Article](#news-article)
- [Contributors](#contributors)
- [FAQ](#faq)
- [Why did you choose such a long name?](#why-did-you-choose-such-a-long-name)
- [Usage](#usage)
- [Setup](#setup)
- [Add Plugin to Gatsby Config](#add-plugin-to-gatsby-config)
- [Add SEO to Page](#add-seo-to-page)
- [A note on Twitter Tags](#a-note-on-twitter-tags)
- [Default SEO Configuration in Gatsby Config](#default-seo-configuration-in-gatsby-config)
- [GatsbySeo Options](#gatsbyseo-options)
- [Title Template](#title-template)
- [No Index](#no-index)
- [dangerouslySetAllPagesToNoIndex](#dangerouslysetallpagestonoindex)
- [No Follow](#no-follow)
- [dangerouslySetAllPagesToNoFollow](#dangerouslysetallpagestonofollow)
- [Twitter](#twitter)
- [facebook](#facebook)
- [Canonical URL](#canonical-url)
- [Alternate](#alternate)
- [Additional Meta Tags](#additional-meta-tags)
- [Open Graph](#open-graph)
- [Open Graph Examples](#open-graph-examples)
- [Basic Example](#basic-example)
- [Video Example](#video-example)
- [Article Example](#article-example)
- [Book Example](#book-example)
- [Profile Example](#profile-example)
- [JSON-LD](#json-ld)
- [Override](#override)
- [Article](#article)
- [News Article](#news-article)
- [Blog Post](#blog-post)
- [Breadcrumb](#breadcrumb)
- [Blog](#blog)
- [Course](#course)
- [Corporate Contact (Deprecated)](#corporate-contact-deprecated)
- [Local Business](#local-business)
- [Logo](#logo)
- [Product](#product)
- [Social Profile (Deprecated)](#social-profile-deprecated)
- [JsonLd](#jsonld)
- [API Docs](#api-docs)
- [FAQ](#faq)
- [Why did you choose `gatsby-plugin-next-seo` as the project name?](#why-did-you-choose-gatsby-plugin-next-seo-as-the-project-name)
- [Contributors](#contributors)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

@@ -624,17 +626,40 @@ export default () => (

Gatsby SEO has the ability to set JSON-LD a form of structured data. Structured data is a standardised format for providing information about a page and classifying the page content.

Google has excellent content on JSON-LD -> [HERE](https://developers.google.com/search/docs/data-types/article)
Google has excellent documentation on JSON-LD -> [HERE](https://developers.google.com/search/docs/data-types/article)

- [Override](#override)
- [Article](#article)
- [Breadcrumb](#breadcrumb)
- [News Article](#news-article)
- [Blog Post](#blog-post)
- [Breadcrumb](#breadcrumb)
- [Blog](#blog)
- [Course](#course)
- [Corporate Contact](#corporate-contact-deprecated)
- [Corporate Contact (Deprecated)](#corporate-contact-deprecated)
- [Local Business](#local-business)
- [Logo](#logo)
- [Product](#product)
- [Social Profile](#social-profile-deprecated)
- [News Article](#news-article)
- [Social Profile (Deprecated)](#social-profile-deprecated)

### Override

Each (non-deprecated) JSON LD component provides a set of utility props to help you in the journey of setting up your your site for Search Engine Optimization and voice assistant support. However there are times when you will need more control, and for these situations there is an `overrides` prop available which allows you to manually override the schema type.

The following example would add a `datePublished` property to the JSON LD head script produced.

```tsx
const OverrideCourseJsonLd = () => (
<CourseJsonLd
name='Course Name'
providerName='Course Provider'
providerUrl='https//www.example.com/provider'
description='Course description goes right here'
overrides={{ '@type': 'Course', datePublished: '2015-02-05T08:00:00+08:00' }}
/>
);
```

Currently, when using TypeScript, you must provide an `@type` property to the `overrides` prop. This may change in the future.

### Article

@@ -667,6 +692,67 @@ export default () => (
);
```

### News Article

This is simply a fancy wrapper around the [`Article`](#article) component.

```jsx
import React from 'react';
import { NewsArticleJsonLd } from 'gatsby-plugin-next-seo';
export default () => (
<>
<h1>News Article JSON-LD</h1>
<NewsArticleJsonLd
url='https://example.com/article'
title='Article headline'
images={[
'https://example.com/photos/1x1/photo.jpg',
'https://example.com/photos/4x3/photo.jpg',
'https://example.com/photos/16x9/photo.jpg',
]}
section='politic'
keywords='prayuth,taksin'
datePublished='2015-02-05T08:00:00+08:00'
dateModified='2015-02-05T09:00:00+08:00'
authorName='Jane Blogs'
publisherName='Gary Meehan'
publisherLogo='https://www.example.com/photos/logo.jpg'
description='This is a mighty good description of this article.'
body='This is all text for this news article'
/>
</>
);
```

### Blog Post

A utility component which wraps the `<ArticleJsonLd />` component but is classified as a `BlogPosting`.

```tsx
import React from 'react';
import { BlogPostJsonLd } from 'gatsby-plugin-next-seo';
*
export default () => (
<>
<h1>Blog Post JSON-LD</h1>
<BlogPostJsonLd
url='https://example.com/blog'
title='Blog headline'
images={[
'https://example.com/photos/1x1/photo.jpg',
'https://example.com/photos/4x3/photo.jpg',
'https://example.com/photos/16x9/photo.jpg',
]}
datePublished='2015-02-05T08:00:00+08:00'
dateModified='2015-02-05T09:00:00+08:00'
authorName='Jane Blogs'
description='This is a mighty good description of this blog.'
/>
</>
);
```

### Breadcrumb

```jsx
@@ -713,25 +799,22 @@ export default () => (
| `itemListElements.name` | The title of the breadcrumb displayed for the user. |
| `itemListElements.item` | The URL to the webpage that represents the breadcrumb. |

### Blog Post
### Blog

A utility component which wraps the `<ArticleJsonLd />` component but is classified as a `BlogPosting`.
Identifies the page as a blog and outlines the available posts.

```tsx
import React from 'react';
import { BlogPostJsonLd } from 'gatsby-plugin-next-seo';
*
export default () => (
<>
<h1>Blog Post JSON-LD</h1>
<BlogPostJsonLd
<h1>Blog with several posts</h1>
<BlogJsonLd
url='https://example.com/blog'
title='Blog headline'
images={[
'https://example.com/photos/1x1/photo.jpg',
'https://example.com/photos/4x3/photo.jpg',
'https://example.com/photos/16x9/photo.jpg',
]}
headline='Blog headline'
images='https://example.com/photos/1x1/photo.jpg',
posts={[{ headline: 'Post 1', image: 'https://example.com/photos/1x1/photo.jpg' }, { headline: 'Post 2' }]}
datePublished='2015-02-05T08:00:00+08:00'
dateModified='2015-02-05T09:00:00+08:00'
authorName='Jane Blogs'
@@ -1020,39 +1103,22 @@ export default () => (
- SoundCloud
- Tumblr

### News Article
### JsonLd

```jsx
import React from 'react';
import { NewsArticleJsonLd } from 'gatsby-plugin-next-seo';
export default () => (
<>
<h1>News Article JSON-LD</h1>
<NewsArticleJsonLd
url='https://example.com/article'
title='Article headline'
images={[
'https://example.com/photos/1x1/photo.jpg',
'https://example.com/photos/4x3/photo.jpg',
'https://example.com/photos/16x9/photo.jpg',
]}
section='politic'
keywords='prayuth,taksin'
datePublished='2015-02-05T08:00:00+08:00'
dateModified='2015-02-05T09:00:00+08:00'
authorName='Jane Blogs'
publisherName='Gary Meehan'
publisherLogo='https://www.example.com/photos/logo.jpg'
description='This is a mighty good description of this article.'
body='This is all text for this news article'
/>
</>
);
```
This is the base JSON component that allows you to create your own JSON LD components according to the spec.

[Google Docs for Social Profile](https://developers.google.com/search/docs/data-types/social-profile)

## API Docs

You can explore the [**api documentation here**](https://github.com/ifiokjr/gatsby-plugin-next-seo/blob/master/docs/api/gatsby-plugin-next-seo.md).

## FAQ

### Why did you choose `gatsby-plugin-next-seo` as the project name?

Unfortunately the better options [gatsby-seo](https://github.com/sidharthachatterjee/gatsby-seo#readme) and [gatsby-plugin-seo](https://github.com/franklintarter/gatsby-plugin-seo/tree/master/gatsby-plugin-seo) were already taken. As a result I've used gatsby-plugin-**next-seo** as a shout out to the original **next-seo** project from which this codebase has been forked.

## Contributors

Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
@@ -1072,9 +1138,3 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

## FAQ

### Why did you choose such a long name?

Unfortunately the better options [gatsby-seo]() and gatsby-plugin-seo were already taken. As a result I've used **gatsby-plugin-next-seo** as a shout out to the original **next-seo** project from which this codebase has been forked.

0 comments on commit 9c4e682

Please sign in to comment.
You can’t perform that action at this time.