docs: add JSON-LD schemas to docs (#14007)
This commit is contained in:
5
www/packages/docs-ui/src/utils/get-json-ld.ts
Normal file
5
www/packages/docs-ui/src/utils/get-json-ld.ts
Normal 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")
|
||||
}
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user