Repository navigation
Conversation
Reverts adding the global JSON-LD Corporation node in docusaurus.config.ts and replaces hard-coded WebSite node with a reference to the @id defined on the marketing site. A reference to the Organization node is added. Adds server/parse-frontmatter.ts, which the existing parseFrontMatter function is moved to from docusaurus.config.ts along with code that inserts the last_update field to the frontmatter block of each page. The value for last_update is populated from the source file's git history. In src/theme/DocItem/Layout/index.tsx, inserts a TechArticle node to the structured data output. The TechArticle node uses the added last_update frontmatter field to populate its dateModified property. Adds the @theme/DocBreadcrumbs as a hidden component to landing pages, which previously completely discarded the component. It is added in order to populate the BreadcrumbList structured data node on these pages as well. Swizzles (--wrap) the DocBreadcrumbs/StructuredData component to append the top-level path (goteleport.com/) as the first item of the list. Additionally, ensures that the second item in the array is "Documentation" pointing to /docs.
|
Amplify deployment status
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adjusts the structured data output for the docs website by:
CorporationnodeWebSiteandOrganizationnodes defined on the marketing websiteBreadcrumbListnode by appending the list with a item labelled "Home", pointing to the marketing website. Additiolly, adds the node to landing pages which previously missed it.TechArticlenode to every documentation page.Context
This PR addresses the marketing team request with the title "Docs JSON-LD: add TechArticle, drop Corporation block, breadcrumbs from Home". Link to the ticket in Asana.
Changes
docusaurus.config.ts. The function is expanded by inserting thelast_updatefield to the frontmatter block of each page. The value forlast_updateis populated from the source file's git history.@theme/DocBreadcrumbsas a hidden component to landing pages, which previously completely discarded the component. It is added in order to populate theBreadcrumbListstructured data node on the landing pages as well.TechArticlenode to the structured data output. The TechArticle node uses the added last_update frontmatter field to populate its dateModified property.