Skip to content

Commit 3daed0f

Browse files
committed
docs: enhance JSDoc for getFrameHtml with parameter docs
1 parent bff7429 commit 3daed0f

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

packages/frames.js/src/getFrameHtml.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ export interface GetFrameHtmlOptions {
1616
}
1717

1818
/**
19-
* Turns a `Frame` into html
20-
* @param frame - The Frame to turn into html
21-
* @param options - additional options passs into the html string
22-
* @returns an html string
19+
* Turns a `Frame` into a complete HTML document string.
20+
* Generates a valid HTML page with proper meta tags for frame rendering.
21+
*
22+
* @param frame - The Frame to turn into HTML
23+
* @param options - Additional options to customize the HTML output
24+
* @param options.og - OpenGraph title configuration
25+
* @param options.title - Custom page title
26+
* @param options.htmlBody - Additional content for the body tag
27+
* @param options.htmlHead - Additional content for the head tag
28+
* @returns A complete HTML document string
2329
*/
2430
export function getFrameHtml(
2531
frame: Frame,
@@ -29,11 +35,10 @@ export function getFrameHtml(
2935
<html>
3036
<head>
3137
<title>${options.title ?? frame.title ?? DEFAULT_FRAME_TITLE}</title>
32-
${
33-
frame.title ?? options.og?.title
34-
? `<meta property="og:title" content="${frame.title ?? options.og?.title}"/>`
35-
: ""
36-
}
38+
${frame.title ?? options.og?.title
39+
? `<meta property="og:title" content="${frame.title ?? options.og?.title}"/>`
40+
: ""
41+
}
3742
${getFrameHtmlHead(frame)}
3843
${options.htmlHead || ""}
3944
</head>

0 commit comments

Comments
 (0)