docs: add JSON-LD schemas to docs (#14007)

This commit is contained in:
Shahed Nasser
2025-11-07 14:43:50 +02:00
committed by GitHub
parent c9648cc9cc
commit dc6f253d31
26 changed files with 146 additions and 17 deletions

View File

@@ -0,0 +1,5 @@
import type { Thing, WithContext } from "schema-dts"
export function getJsonLd<T extends Thing>(data: WithContext<T>): string {
return JSON.stringify(data, null, 2).replace(/</g, "\\u003c")
}

View File

@@ -4,6 +4,7 @@ export * from "./check-sidebar-item-visibility"
export * from "./decode-str"
export * from "./dom-utils"
export * from "./event-parser"
export * from "./get-json-ld"
export * from "./get-link-with-base-path"
export * from "./get-local-search"
export * from "./get-navbar-items"