Skip to content

Commit 47d7797

Browse files
committed
doc: apply shiki
1 parent 57b065e commit 47d7797

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/docs/howto/intro.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,19 @@ However, it is possible to achieve higher performance via techniques such as cod
116116
For example, you can use [`swc-plugin-static-jsx`](https://github.com/Desdaemon/swc-plugin-static-jsx)
117117
which will transform the demo snippet into pure string interpolation:
118118

119-
```ts
120-
// User-provided template function
121-
function html(raw: TemplateStringsArray, ...args: unknown[]): string {
122-
// ..
119+
```ts twoslash
120+
// Use typed-htmx's template function
121+
import { html } from "typed-htmx";
122+
123+
// Or provide your own
124+
function myHtml(raw: TemplateStringsArray, ...args: unknown[]): string {
125+
return `..`;
123126
}
124127

125128
function MyComponent({ children }) {
126129
return (
127130
"<!DOCTYPE html>" +
128-
html` <html lang="en">
131+
html`<html lang="en">
129132
<head>
130133
<title>My Website</title>
131134
</head>

0 commit comments

Comments
 (0)