Skip to content

feat: add HowTo JSON-LD schema to quickstart guides#1165

Open
kevlil83 wants to merge 2 commits into
mainfrom
feat/quickstart-jsonld-schema
Open

feat: add HowTo JSON-LD schema to quickstart guides#1165
kevlil83 wants to merge 2 commits into
mainfrom
feat/quickstart-jsonld-schema

Conversation

@kevlil83
Copy link
Copy Markdown
Contributor

@kevlil83 kevlil83 commented May 12, 2026

Summary

  • Adds main/snippets/JsonLd.jsx — a minimal reusable snippet that renders a <script type="application/ld+json"> tag from a data prop.
  • Applies HowTo structured data to 39 quickstart index.mdx pages across native, SPA, webapp, and backend platforms, exposing each guide's steps as machine-readable HowToStep entries.
  • Corrects 4 pre-existing broken links in the Next Steps sections of files already touched (surfaced by Lychee).

Why

Experiment for project HockeyStick. Improves discoverability in AI-powered search (ChatGPT, Perplexity, Google AI Overviews, Gemini) and in traditional search rich results. Quickstarts are our highest-intent entry pages — making their step structure machine-readable helps these surfaces cite and summarize them accurately.

Scope

  • 39 quickstart pages touched: 19 native, 7 SPA, 13 webapp
  • One new snippet: main/snippets/JsonLd.jsx (6 lines)
  • Four link fixes bundled in since they were pre-existing 404s in sections we were already editing
  • No navigation or docs.json changes
  • No UI library (/ui) rebuild needed — JsonLd is an MDX snippet, not a component

Link fixes included

File Before After
backend/golang /deploy-monitor/production-checks (404) /deploy-monitor/pre-deployment-checks/production-checks-best-practices
webapp/express /quickstart/webapp/express/02-user-profile (404) /manage-users/access-control/rbac
webapp/express /quickstart/webapp/express/03-authorization (404) /secure/tokens/access-tokens/get-access-tokens
webapp/java https://support.auth0.com/ (auth-gated 302) (removed; Community link retained)

Test plan

  • cd main && mint dev renders without new errors
  • View source on quickstart pages and confirm one application/ld+json block with valid JSON is present
  • Paste rendered JSON into https://validator.schema.org — no errors on a sample of 3-5 pages
  • Spot-check the four corrected links navigate to live pages
  • Spot-check pages: /docs/quickstart/webapp/nextjs, /docs/quickstart/backend/golang, /docs/quickstart/spa/react, /docs/quickstart/native/ios-swift

Supersedes #1164 (closed with identical content; squashed to a single commit).

Adds a reusable JsonLd snippet and HowTo structured data to 39 quickstart
index pages across native, SPA, webapp, and backend platforms. Improves
discoverability in AI search (ChatGPT, Perplexity, Google AI Overviews)
and in traditional search rich results by exposing each quickstart's
steps as machine-readable HowToStep entries.

Also corrects four pre-existing broken links surfaced by Lychee in the
Next Steps sections of files being touched:

- golang: Production Checklist -> Production Readiness Checks
  (/deploy-monitor/pre-deployment-checks/production-checks-best-practices)
- express: Add Authorization -> /manage-users/access-control/rbac
- express: Call Protected APIs -> /secure/tokens/access-tokens/get-access-tokens
- java: drop Support Center link (auth-gated 302); keep Community
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

Summary

Status Count
🔍 Total 330
✅ Successful 219
⏳ Timeouts 0
🔀 Redirected 36
👻 Excluded 75
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 0

Redirects per input

Redirects in main/docs/quickstart/backend/aspnet-core-webapi/index.mdx

Redirects in main/docs/quickstart/backend/fastapi/index.mdx

Redirects in main/docs/quickstart/backend/golang/index.mdx

Redirects in main/docs/quickstart/backend/python/index.mdx

Redirects in main/docs/quickstart/native/android-facebook-login/index.mdx

Redirects in main/docs/quickstart/native/android/index.mdx

Redirects in main/docs/quickstart/native/ionic-angular/index.mdx

Redirects in main/docs/quickstart/native/ionic-vue/index.mdx

Redirects in main/docs/quickstart/native/ios-swift-facebook-login/index.mdx

Redirects in main/docs/quickstart/native/maui/index.mdx

Redirects in main/docs/quickstart/native/react-native-expo/index.mdx

Redirects in main/docs/quickstart/native/react-native/index.mdx

Redirects in main/docs/quickstart/native/wpf-winforms/index.mdx

Redirects in main/docs/quickstart/spa/angular/index.mdx

Redirects in main/docs/quickstart/spa/flutter/index.mdx

Redirects in main/docs/quickstart/spa/react/index.mdx

Redirects in main/docs/quickstart/spa/vanillajs/index.mdx

Redirects in main/docs/quickstart/spa/vuejs/index.mdx

Redirects in main/docs/quickstart/webapp/aspnet-core-blazor-server/index.mdx

Redirects in main/docs/quickstart/webapp/aspnet-core/index.mdx

Redirects in main/docs/quickstart/webapp/express/index.mdx

Redirects in main/docs/quickstart/webapp/fastapi/index.mdx

Redirects in main/docs/quickstart/webapp/fastify/index.mdx

Redirects in main/docs/quickstart/webapp/nextjs/index.mdx

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 12, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
auth0 🟢 Ready View Preview May 12, 2026, 9:23 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
Contributor

@mikemimik mikemimik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Question: @kevlil83 where on the page is this script tag supposed to be for AI agents to find it?

ℹ️ When this renders the script tag is deep in the structure of the page, as denoted by the image below

Image

❓ Question: @kevlil83 the description mentions that this fixes broken pages, which implies this wasn't broken at one time. Do you have reference examples of what these pages looked like when they weren't broken to help compare to?

Comment thread main/snippets/JsonLd.jsx Outdated
export const JsonLd = ({ data }) => (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ I don't like that we're using dangerouslySetInnerHTML to add this text to the script tag. There is a way to do this using react refs that can do the same thing without using the dangerouslySetInnerHTML tag.

import { useEffect, useRef } from 'react';

export const JsonLd = ({ data }) => {
  const scriptRef = useRef(null);

  useEffect(() => {
    if (scriptRef.current) {
      // Safely stringify and set as raw text

      // INFO: this example does a string replace to denote
      // that you can do that here.
      const safeJson = JSON.stringify(data).replace(/</g, '\\u003c');
      scriptRef.current.text = safeJson;
    }
  }, [data]);

  return <script type="application/ld+json" ref={scriptRef} />;
};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Question: @kevlil83 the description mentions that this fixes broken pages, which implies this wasn't broken at one time. Do you have reference examples of what these pages looked like when they weren't broken to help compare to?

@mikemimik thanks for the review here. Not sure I'm following this comment. A few quickstarts had 404's in the next steps section linking to pages that didn't exist anymore. Lychee caught these and I just fixed them as part of this PR.

Copy link
Copy Markdown
Contributor Author

@kevlil83 kevlil83 May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikemimik for the script comment, swapped dangerouslySetInnerHTML for the ref + useEffect pattern with the escape and pushed that up. On the placement question, would be ideal but Mintlify doesn't give us a way to inject custom script tags there. No docs.json or frontmatter option for it today. The JSON-LD spec allows the tag in either or , and crawlers scan the full DOM, so it still gets picked up where it is. At least thats my understanding from my research 🤷‍♂️

Replaces dangerouslySetInnerHTML with the useRef + useEffect pattern
suggested in code review, including a < -> < escape to guard
against the JSON ever containing content that could break out of
the script tag. Behavior on Mintlify is equivalent.
Copy link
Copy Markdown
Contributor

@hazel-nut hazel-nut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not in love with this implementation requiring us to manually duplicate all the step information.

given that the quickstarts already use the Steps component, a better approach may be to extract it from there.

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

Successfully merging this pull request may close these issues.

4 participants