MCPcopy Index your code
hub / github.com/code-hike/codehike / renderHTML

Function renderHTML

packages/codehike/tests/utils.ast.tsx:65–81  ·  view source on GitHub ↗
(
  file: MDFile,
  options: CompileOptions,
  render: (Content: MDXContent) => any = defaultRender,
)

Source from the content-addressed store, hash-verified

63}
64
65export async function renderHTML(
66 file: MDFile,
67 options: CompileOptions,
68 render: (Content: MDXContent) => any = defaultRender,
69) {
70 const result = await compile(file, {
71 ...options,
72 outputFormat: "function-body",
73 })
74 const { default: Content } = await run(
75 result,
76 (options.development ? devRuntime : runtime) as any,
77 )
78
79 const html = await rscToHTML(render(Content))
80 return html
81}
82
83function defaultRender(Content: MDXContent) {
84 // @ts-ignore

Callers 1

getStepOutputFunction · 0.90

Calls 2

rscToHTMLFunction · 0.85
renderFunction · 0.50

Tested by 1

getStepOutputFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…