Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / docs / readDoc

Function: readDoc()

readDoc(id): string

Defined in: packages/b2c-tooling-sdk/src/docs/search.ts:89

Reads the content of a documentation file by its ID.

Parameters

id

string

The documentation ID (filename without .md extension)

Returns

string

The raw markdown content of the document

Throws

Error if the document is not found

Example

typescript
const content = readDoc('dw.catalog.ProductMgr');
console.log(content);

Released under the Apache-2.0 License.