You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError(`Only \`SafeHtml\` objects can be used in \`*.html\` or \`*.htm\` files. Use a rendering engine like \`@rules_prerender/preact\` to render to \`SafeHtml\`.`);
36
37
}
@@ -49,7 +50,7 @@ export class PrerenderResource {
49
50
*
50
51
* @param path The path the file will be generated at relative to the final
51
52
* generated site. Must begin with a `/` character. Must *not* end in
52
-
* `.html` or `.htm`. Use {@link PrerenderResource.of} with
53
+
* `.html` or `.htm`. Use {@link PrerenderResource.fromHtml} with
53
54
* {@link SafeHtml} to generate HTML content.
54
55
* @param contents A UTF-8 encoded string to output at the given path.
55
56
* @returns A {@link PrerenderResource} object representing the resource.
@@ -60,7 +61,7 @@ export class PrerenderResource {
60
61
// constructed and there could be injection attacks within it.
thrownewError(`Cannot generate a \`*.html\` or \`*.htm\` file (${
63
-
path}) from a raw string (this would be unsafe!). HTML content should be rendered to \`SafeHtml\` first, and then written to a file in \`PrerenderResource.of()\`.`);
64
+
path}) from a raw string (this would be unsafe!). HTML content should be rendered to \`SafeHtml\` first, and then written to a file in \`PrerenderResource.fromHtml()\`.`);
64
65
}
65
66
66
67
returnnewPrerenderResource({
@@ -75,7 +76,7 @@ export class PrerenderResource {
75
76
*
76
77
* @param path The path the file will be generated at relative to the final
77
78
* generated site. Must begin with a `/` character. Must *not* end in
78
-
* `.html` or `.htm`. Use {@link PrerenderResource.of} with
79
+
* `.html` or `.htm`. Use {@link PrerenderResource.fromHtml} with
79
80
* {@link SafeHtml} to generate HTML content.
80
81
* @param contents Binary content to associate with the given path.
81
82
* @returns A {@link PrerenderResource} object representing the resource.
@@ -89,7 +90,7 @@ export class PrerenderResource {
89
90
// constructed and there could be injection attacks within it.
thrownewError(`Cannot generate a \`*.html\` or \`*.htm\` file (${
92
-
path}) from a raw string (this would be unsafe!). HTML content should be rendered to \`SafeHtml\` first, and then written to a file in \`PrerenderResource.of()\`.`);
93
+
path}) from a raw string (this would be unsafe!). HTML content should be rendered to \`SafeHtml\` first, and then written to a file in \`PrerenderResource.fromHtml()\`.`);
0 commit comments