UNPKG

24.4 kBMarkdownView Raw
1# microsite
2
3## 1.2.1
4
5### Patch Changes
6
7- 7e7f215: Fix issue with dynamic routes in dev mode (#144)
8- faed63e: Fix #137 by not hardcoding Preact CDN sources
9
10## 1.2.0
11
12### Minor Changes
13
14- 3683b12: Enabled the use of `snowpack.config.js` in ESM format to mirror Snowpack's new support.
15
16 Cleaned up some unused internal files and removed their dependencies.
17
18 Removed automatic PostCSS handling. If you have a PostCSS config file, it is your responsibility to create a `snowpack.config.js` file and install and configure `@snowpack/plugin-postcss`.
19
20## 1.1.0
21
22### Minor Changes
23
24- 889da9a: Implements fragment-based hydration. This is a **breaking change**—the previous behavior was to wrap any hydrated components in a `div` with `display: contents` but this new behavior has the benefit of not modifying the document flow at all.
25
26 **Breaking change**: The `interaction` hydration strategy has been removed. In practice it tended to actually _cause_ interaction delays because hydration work would occur in an input-blocking fashion. Use `idle` or `visible`.
27
28### Patch Changes
29
30- 53ea544: Fixed a bug when using any --flag with "microsite" CLI
31- 889da9a: Add support for deployment to a relative subdirectory. To enable this behavior, either set `"homepage": "/subdir"` in `package.json` or pass `--base-path=/subdir` to `microsite build`.
32- c3e1ec5: Always output hashed files with an 8 character hash
33- 0c9d426: Include shim for `requestIdleCallback` for Safari
34- 0c9d426: Fix error with previous shared CSS module logic, adds \_static output directory
35- 0c9d426: Fix <Head> component bug
36- 0c9d426: Update hydration method to be compatible with `preact@10.5.11+`. Allows `preact@^10.5.12`.
37- 0c9d426: Remove prettier from core dependencies
38- 2468a3a: Dev server now uses `etag` for caching and chunk behavior for `global/index.ts` files has been fixed
39- 06f439b: Add `--no-open` flag to `microsite dev` and `microsite build --serve`. This flag allows you to skip the default behavior of automatically opening your browser.
40- 0c9d426: Prefer pinned Skypack URLs to lookup URLs. Improves load waterfall significantly. Fixes #106.
41- 0c9d426: Adds a `fallback` option to `withHydrate` to allow customization of server-side rendering behavior.
42- 0c9d426: Pin `preact@10.5.10` and `snowpack@~3.0.11`
43- 0c9d426: Remove PostCSS logic from core dependencies. Microsite will prompt users to install PostCSS locally if detected.
44- efdc433: Add support for custom "pages/\_document.tsx" file
45- 355eb2b: Fixed a bug with custom document rendering
46- 0c9d426: Fix missed edge case with CSS module assets shared between pages (#126)
47- 0c9d426: Update snowpack to snowpack@3.0.13
48- 0c9d426: fix(#119): remove `defer` from inline script`
49
50 fix(#115): do not include vendor chunk in hydrateBindings
51
52- db45d3b: Add support for custom "snowpack.config.cjs" files
53
54## 1.1.0-next.11
55
56### Patch Changes
57
58- 6723b24: Adds a `fallback` option to `withHydrate` to allow customization of server-side rendering behavior.
59
60## 1.1.0-next.10
61
62### Patch Changes
63
64- 7fcba84: Fix error with previous shared CSS module logic, adds \_static output directory
65
66## 1.1.0-next.9
67
68### Patch Changes
69
70- 64ca86e: Fix missed edge case with CSS module assets shared between pages (#126)
71
72## 1.1.0-next.8
73
74### Patch Changes
75
76- 3d8b6e0: Prefer pinned Skypack URLs to lookup URLs. Improves load waterfall significantly. Fixes #106.
77- 81b1f9a: Update snowpack to snowpack@3.0.13
78
79## 1.1.0-next.7
80
81### Patch Changes
82
83- fix(#119): remove `defer` from inline script`
84- fix(#115): do not include vendor chunk in hydrateBindings
85
86## 1.1.0-next.6
87
88### Patch Changes
89
90- ddd48ea: Include shim for `requestIdleCallback` for Safari
91- d486147: Update hydration method to be compatible with `preact@10.5.11+`. Allows `preact@^10.5.12`.
92
93## 1.1.0-next.5
94
95### Patch Changes
96
97- Pin `preact@10.5.10` and `snowpack@~3.0.11`
98
99## 1.1.0-next.4
100
101### Patch Changes
102
103- 4c63780: Fix <Head> component bug
104- 669eab2: Remove prettier from core dependencies
105- 1eb8733: Remove PostCSS logic from core dependencies. Microsite will prompt users to install PostCSS locally if detected.
106
107## 1.1.0-next.3
108
109### Patch Changes
110
111- 2468a3a: Dev server now uses `etag` for caching and chunk behavior for `global/index.ts` files has been fixed
112
113## 1.1.0-next.2
114
115### Patch Changes
116
117- Fixed a bug with custom document rendering
118
119## 1.1.0-next.1
120
121### Patch Changes
122
123- 53ea544: Fixed a bug when using any --flag with "microsite" CLI
124- c3e1ec5: Always output hashed files with an 8 character hash
125- 06f439b: Add `--no-open` flag to `microsite dev` and `microsite build --serve`. This flag allows you to skip the default behavior of automatically opening your browser.
126- efdc433: Add support for custom "pages/\_document.tsx" file
127- db45d3b: Add support for custom "snowpack.config.cjs" files
128
129## 1.1.0-next.0
130
131### Minor Changes
132
133- 889da9a: Implements fragment-based hydration. This is a **breaking change**&mdash;the previous behavior was to wrap any hydrated components in a `div` with `display: contents` but this new behavior has the benefit of not modifying the document flow at all.
134
135 **Breaking change**: The `interaction` hydration strategy has been removed. In practice it tended to actually _cause_ interaction delays because hydration work would occur in an input-blocking fashion. Use `idle` or `visible`.
136
137### Patch Changes
138
139- 889da9a: Add support for deployment to a relative subdirectory. To enable this behavior, either set `"homepage": "/subdir"` in `package.json` or pass `--base-path=/subdir` to `microsite build`.
140
141## 1.0.3
142
143### Patch Changes
144
145- b94b6a9: Fix handling of js/tsconfig.json without a "paths" option
146
147## 1.0.2
148
149### Patch Changes
150
151- 1559789: Fix bug with Snowpack's esinstall and Microsite's global state utility
152- 9241da7: - Update @prefresh/snowpack to effectively update effects and memoization
153
154## 1.0.1
155
156### Patch Changes
157
158- 41f0201: Remove init script if no hydrated components exist
159- fe2d1d7: Resolve exact version of Preact used in project
160- 712dc53: Fixes build issue where no esm dependencies would be found
161
162## 1.0.0
163
164### Major Changes
165
166- 2ae753d: Microsite has been completely rewritten to focus on what it does best—optimize your static site for partial hydration.
167
168 Rather than implementing a highly-opinionated, custom build pipeline, Microsite@1.0.0 leverages the power of [Snowpack](https://www.snowpack.dev/)'s upcoming 3.0.0 release. This means that there are a number of new features, notably:
169
170 - Pages can now be written in your preferred file format—TypeScript or plain old JavaScript.
171 - If your file/asset types are [supported in Snowpack](https://www.snowpack.dev/reference/supported-files), they are supported by Microsite. This is because Microsite has delegated the initial compilation of your site completely to Snowpack!
172 - `microsite dev` spins up a Snowpack development server with best-in-class DX, including built-in HMR with [Prefresh](https://github.com/JoviDeCroock/prefresh/tree/main).
173 - `microsite build --serve` performs a build and serves the result on a local server, for testing production builds.
174
175 There are a small number of breaking changes in the release:
176
177 - Microsite now relies on explicit [subpath exports](https://nodejs.org/api/packages.html#packages_subpath_exports), meaning only public files can be accessed from Node.
178 - Global asset entry points have been moved from `src/global.ts` and `src/global.css` to `src/global/index.ts` and `src/global/index.css`.
179 - Global scripts are no longer executed as a side-effect. Global scripts must contain a single `export default async () => {}`, which is executed on page load.
180
181### Patch Changes
182
183- 914bf18: Fix cosmicconfig CJS interop issue
184- 727fc04: Remove cache dir for now
185- 7681446: Fixed a bug where automatic JSX inject would not always be triggered
186- d5993d7: Automatically use PostCSS if a postcss.config.cjs file is found
187- a3b38a8: Automatic JSX injection is fixed (I really mean it this time.)
188
189 Added automatic aliasing for `tsconfig` `paths`.
190
191 Fixed a bug where `microsite/global` was not included in the vendor bundle.
192
193 Fixed a bug where `shared` components would not be concatenated into a single chunk.
194
195 Added minification for the `init` hydration script.
196
197- c17d109: Fix bug with JSX Pragma injection
198- 1dff58f: Fixed issue with automatic environment typings.
199
200 Fixed issue where JSX pragma (`h`, `Fragment`) was not being automatically injected.
201
202 Enabled Snowpack to pick up on `tsconfig.json` or `jsconfig.json` `paths` aliases automatically.
203
204## 1.0.0-next.7
205
206### Patch Changes
207
208- 727fc04: Remove cache dir for now
209
210## 1.0.0-next.6
211
212### Patch Changes
213
214- 914bf18: Fix cosmicconfig CJS interop issue
215
216## 1.0.0-next.5
217
218### Patch Changes
219
220- Automatically use PostCSS if a postcss.config.cjs file is found
221
222## 1.0.0-next.4
223
224### Patch Changes
225
226- a3b38a8: Automatic JSX injection is fixed (I really mean it this time.)
227
228 Added automatic aliasing for `tsconfig` `paths`.
229
230 Fixed a bug where `microsite/global` was not included in the vendor bundle.
231
232 Fixed a bug where `shared` components would not be concatenated into a single chunk.
233
234 Added minification for the `init` hydration script.
235
236## 1.0.0-next.3
237
238### Patch Changes
239
240- 7681446: Fixed a bug where automatic JSX inject would not always be triggered
241
242## 1.0.0-next.2
243
244### Patch Changes
245
246- Fix bug with JSX Pragma injection
247
248## 1.0.0-next.1
249
250### Patch Changes
251
252- Fixed issue with automatic environment typings.
253
254 Fixed issue where JSX pragma (`h`, `Fragment`) was not being automatically injected.
255
256 Enabled Snowpack to pick up on `tsconfig.json` or `jsconfig.json` `paths` aliases automatically.
257
258## 1.0.0-next.0
259
260### Major Changes
261
262- 2ae753d: Microsite has been completely rewritten to focus on what it does best—optimize your static site for partial hydration.
263
264 Rather than implementing a highly-opinionated, custom build pipeline, Microsite@1.0.0 leverages the power of [Snowpack](https://www.snowpack.dev/)'s upcoming 3.0.0 release. This means that there are a number of new features, notably:
265
266 - Pages can now be written in your preferred file format—TypeScript or plain old JavaScript.
267 - If your file/asset types are [supported in Snowpack](https://www.snowpack.dev/reference/supported-files), they are supported by Microsite. This is because Microsite has delegated the initial compilation of your site completely to Snowpack!
268 - `microsite dev` spins up a Snowpack development server with best-in-class DX, including built-in HMR with [Prefresh](https://github.com/JoviDeCroock/prefresh/tree/main).
269 - `microsite build --serve` performs a build and serves the result on a local server, for testing production builds.
270
271 There are a small number of breaking changes in the release:
272
273 - Microsite now relies on explicit [subpath exports](https://nodejs.org/api/packages.html#packages_subpath_exports), meaning only public files can be accessed from Node.
274 - Global asset entry points have been moved from `src/global.ts` and `src/global.css` to `src/global/index.ts` and `src/global/index.css`.
275 - Global scripts are no longer executed as a side-effect. Global scripts must contain a single `export default async () => {}`, which is executed on page load.
276
277## 0.7.6
278
279### Patch Changes
280
281- 837da9c: Fix issue with `<pre> <code>` dedent
282
283## 0.7.5
284
285### Patch Changes
286
287- cb4da30: Fix dedent within <pre> tags
288
289## 0.7.4
290
291### Patch Changes
292
293- 5eb1b20: Fix issue where shared styles of non-hydrated components would not be included in the output
294
295## 0.7.3
296
297### Patch Changes
298
299- 2535fe9: Fix bug where global script would have extra code injected
300
301## 0.7.2
302
303### Patch Changes
304
305- c71d8da: Whoops, actually fix that bundling bug
306
307## 0.7.1
308
309### Patch Changes
310
311- bf8cfa0: Fix bundling bug
312
313## 0.7.0
314
315### Minor Changes
316
317- 65bf0bd: Implements a caching strategy for `getStaticProps` and `getStaticPaths`, which can often become a build bottleneck due to network or filesystem reads.
318
319 This change introduces a new `prefetch` method for both of these functions. [Read the docs](/docs/data-fetching) for more details.
320
321### Patch Changes
322
323- 4475a3c: Update prefetch logic to accomodate changing headers
324- f3b313b: Update to esbuild@0.8.x
325
326## 0.7.0-next.2
327
328### Patch Changes
329
330- 4475a3c: Update prefetch logic to accomodate changing headers
331
332## 0.7.0-next.1
333
334### Patch Changes
335
336- f3b313b: Update to esbuild@0.8.x
337
338## 0.7.0-next.0
339
340### Minor Changes
341
342- 65bf0bd: Implements a caching strategy for `getStaticProps` and `getStaticPaths`, which can often become a build bottleneck due to network or filesystem reads.
343
344 This change introduces a new `prefetch` method for both of these functions. [Read the docs](/docs/data-fetching) for more details.
345
346## 0.6.14
347
348### Patch Changes
349
350- e18c71c: Fix Linux shebang issue (#40) by removing need for --experimental-module-resolution=node. Uses .js import specifiers everywhere
351
352## 0.6.13
353
354### Patch Changes
355
356- 86bdb17: Fix bug where &lt;pre> code was improperly indented
357
358## 0.6.12
359
360### Patch Changes
361
362- 9d22932: Update to typescript@4.1.2
363- 217299b: Update Document viewport meta tag, html lang and dir
364
365## 0.6.12-next.0
366
367### Patch Changes
368
369- 9d22932: Update to typescript@4.1.2
370- 217299b: Update Document viewport meta tag, html lang and dir
371
372## 0.6.11
373
374### Minor Changes
375
376- fd4c454: Add [HTTP Caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching) to `fetch` via [`make-fetch-happen`](https://github.com/zkat/make-fetch-happen/). Thanks [@zkat](https://github.com/zkat)!
377
378## 0.6.10
379
380### Patch Changes
381
382- 8a7374f: Add preload hints for hydrated pages
383- 6d0f3a3: Microsite's partial hydration method manages each component as a seperate Preact tree, meaning standard `Context` won't work across components.
384
385 This update adds a `microsite/global` entry point which exposes two utilities for sharing state across component trees.
386
387 **`createGlobalState`** creates a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) which acts as a mutable data source. Mutating this object notifies any consuming components that they should rerender.
388
389 > If you're a fan of Vue, this is very similar to `reactive` from the Composition API.
390
391 Components can consume this global state object via **`useGlobalState(state)`**.
392
393 ```tsx
394 // utils/state.tsx
395 import { createGlobalState } from "microsite/global";
396
397 export const state = createGlobalState({
398 count: 0
399 });
400
401 // components/Counter.tsx
402 import { withHydrate } from "microsite/hydrate";
403 import { useGlobalState } from "microsite/global";
404 import { state } from "@/utils/state";
405
406 const Counter = () => {
407 const localState = useGlobalState(state);
408 // `localState` is a readonly snapshot of global `state`
409 // Updates can be written to global `state` by direct mutation
410
411 return (
412 <>
413 <button onClick={() => state.count--}>-</button>
414 <span>{localState.count}</span>
415 <button onClick={() => state.count++}>+</button>
416 </>
417 );
418 };
419
420 export default withHydrate(Counter);
421 ```
422
423- 6d0f3a3: Fix issue with CSS scoped name generation
424
425## 0.6.9
426
427### Patch Changes
428
429- 788860d: Add --no-clean flag to persist intermediate build (useful for debugging)
430- 64add28: Fixes issue with named hydration chunks
431- 10f9fd5: Improve caching by using external styles rather than inlined styles
432- 0641e72: Update microsite bin to use correct arguments
433
434## 0.6.9-next.0
435
436### Patch Changes
437
438- Add --no-clean flag to persist intermediate build (useful for debugging)
439
440## 0.6.6
441
442### Patch Changes
443
444- 7e955a0: Ensure children is not required for Head component
445
446## 0.6.5
447
448### Patch Changes
449
450- f65c7f4: Improve types by adding global `h` and `Fragment`, and ambient `*.modules.css` declarations
451
452## 0.6.4
453
454### Patch Changes
455
456- e53864f: Update default `tsconfig` to be named `base`.
457
458 Update `tsconfig.baseUrl` to resolve from inside `node_modules`
459
460## 0.6.3
461
462### Patch Changes
463
464- a760228: Automatically inject h and Fragment
465- 580bb4f: expose default tsconfig.json for end-users
466
467## 0.6.2
468
469### Patch Changes
470
471- 60de6a2: Fix esbuild jsxFactory
472
473## 0.6.1
474
475### Patch Changes
476
477- a3a5131: Fix external warning
478- 5c79ec3: update README
479
480## 0.6.0
481
482### Breaking Changes
483
484- 9d0e9cc: Drop `@types/react` and switch to `preact`. See issue [#5](https://github.com/natemoo-re/microsite/issues/5) for more background.
485
486## 0.0.0-canary-2020101419274
487
488### Breaking Changes
489
490- 7fd4679: Drop `@types/react` and switch to `preact`. See issue [#5](https://github.com/natemoo-re/microsite/issues/5) for more background.
491
492## 0.5.1
493
494### Patch Changes
495
496- 3d99331: Fix handling of node builtins for intermediate builds
497- 3d99331: Remove .microsite/cache dir for now
498
499## 0.5.1-next.0
500
501### Patch Changes
502
503- a29b71e: Fix handling of node builtins for intermediate builds
504- 078b910: Remove .microsite/cache dir for now
505
506## 0.5.0
507
508### Minor Changes
509
510- 47eec22: **Build performance improvements**
511
512 Rather than relying on [`@rollup/plugin-typescript`](https://github.com/rollup/plugins/tree/master/packages/typescript) (which uses `typescript` under the hood), we have switched to [`rollup-plugin-esbuild`](https://github.com/egoist/rollup-plugin-esbuild) to perform code transforms.
513
514 [`esbuild`](https://github.com/evanw/esbuild) is very very fast. Now, so is Microsite.
515
516### Patch Changes
517
518- 275f297: Gracefully handle Component/export name mismatch
519
520 Automatically handle `tsconfig.paths` aliases
521
522- 945685d: **SEO**
523
524 Microsite aims to make SEO as simple as possible, so this featureset adds built-in SEO utility components to `microsite/head` under the `seo` namespace.
525
526 The benefit of using `seo` components over manual `meta` tag configuration is API simplicity, since `seo` automatically configures duplicate [Open Graph](https://ogp.me/)/social meta tags for you.
527
528 If something here doesn't cover your use case, please feel free to [open an issue](https://github.com/natemoo-re/microsite/issues/new).
529
530 ```tsx
531 import { Head, seo } from "microsite/head";
532
533 <Head>
534 <seo.title>Easy SEO</seo.title>
535 <seo.description>Hello world!</seo.description>
536 <seo.image
537 src="https://og-image.now.sh/**Hello**%20World.png?theme=light&md=1&fontSize=100px&images=https%3A%2F%2Fassets.vercel.com%2Fimage%2Fupload%2Ffront%2Fassets%2Fdesign%2Fvercel-triangle-black.svg"
538 width={100}
539 height={100}
540 />
541 <seo.twitter handle="@n_moore" />
542 </Head>;
543 ```
544
545 #### seo.robots
546
547 By default, `<Head>` now automatically adds the following tags.
548
549 ```html
550 <meta name="robots" content="index,follow" />
551 <meta name="googlebot" content="index,follow" />
552 ```
553
554 This behavior can be controlled with the `<seo.robots>` helper, which accepts `noindex` and `nofollow` booleans.
555
556 ```tsx
557 <seo.robots noindex nofollow />
558 ```
559
560 #### seo.title
561
562 `<seo.title>` has the same API as a regular `<title>` tag—it accepts a `string` child. `<seo.title>` sets the page `<title>` as well as `<meta property="og:title">`.
563
564 #### seo.description
565
566 `<seo.description>` accepts a `string` child. `<seo.description>` sets `<meta name="description">` as well as `<meta property="og:description">`.
567
568 #### seo.canonical
569
570 `<seo.canonical>` accepts a `string` child representing the canonical URL of the current page. It generates `<link rel="canonical">` and `<meta property="og:url">`.
571
572 #### seo.image
573
574 `<seo.image>` exposes an API similar to the native `<img>`, accepting `src`, `alt`, `width`, and `height` props. It generates all the meta tags necessary for valid Open Graph images.
575
576 #### seo.video
577
578 `<seo.video>` exposes an API similar to the native `<video>`, accepting `src`, `width`, and `height` props. It generates all the meta tags necessary for valid Open Graph videos.
579
580 #### seo.audio
581
582 `<seo.audio>` exposes an API similar to the native `<audio>`, accepting only a `src` prop. It generates all the meta tags necessary for valid Open Graph audio.
583
584 #### seo.twitter
585
586 `<seo.twitter>` controls [Twitter meta tags](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup). It accepts `card`, `handle` (maps to `twitter:creator`), and `site`.
587
588 #### seo.facebook
589
590 `<seo.facebook>` accepts an `appId` in order to set `<meta property="fb:app_id">`.
591
592 #### seo.openGraph
593
594 `<seo.openGraph>` provides low-level control over [Open Graph meta tags](https://ogp.me/). The accepted props vary based on `type`, so you might want to dig [into the code](https://github.com/natemoo-re/microsite/blob/8c0599f8c05da3214534b864c536a2614a89fb7f/src/head.tsx#L14) for this one.
595
596- 17e3130: Fix issue when building projects without optional global/hydrated files
597- da6e0f3: Improve build performance (parallelization)
598- eaec00b: Fixes issue with static path generation for the `/` route
599
600## 0.5.0-alpha.0
601
602### Minor Changes
603
604- 47eec22: **Build performance improvements**
605
606 Rather than relying on [`@rollup/plugin-typescript`](https://github.com/rollup/plugins/tree/master/packages/typescript) (which uses `typescript` under the hood), we have switched to [`rollup-plugin-esbuild`](https://github.com/egoist/rollup-plugin-esbuild) to perform code transforms.
607
608 [`esbuild`](https://github.com/evanw/esbuild) is very very fast. Now, so is Microsite.
609
610### Patch Changes
611
612- 945685d: **SEO**
613
614 Microsite aims to make SEO as simple as possible, so this featureset adds built-in SEO utility components to `microsite/head` under the `seo` namespace.
615
616 The benefit of using `seo` components over manual `meta` tag configuration is API simplicity, since `seo` automatically configures duplicate [Open Graph](https://ogp.me/)/social meta tags for you.
617
618 If something here doesn't cover your use case, please feel free to [open an issue](https://github.com/natemoo-re/microsite/issues/new).
619
620 ```tsx
621 import { Head, seo } from "microsite/head";
622
623 <Head>
624 <seo.title>Easy SEO</seo.title>
625 <seo.description>Hello world!</seo.description>
626 <seo.image
627 src="https://og-image.now.sh/**Hello**%20World.png?theme=light&md=1&fontSize=100px&images=https%3A%2F%2Fassets.vercel.com%2Fimage%2Fupload%2Ffront%2Fassets%2Fdesign%2Fvercel-triangle-black.svg"
628 width={100}
629 height={100}
630 />
631 <seo.twitter handle="@n_moore" />
632 </Head>;
633 ```
634
635 #### seo.robots
636
637 By default, `<Head>` now automatically adds the following tags.
638
639 ```html
640 <meta name="robots" content="index,follow" />
641 <meta name="googlebot" content="index,follow" />
642 ```
643
644 This behavior can be controlled with the `<seo.robots>` helper, which accepts `noindex` and `nofollow` booleans.
645
646 ```tsx
647 <seo.robots noindex nofollow />
648 ```
649
650 #### seo.title
651
652 `<seo.title>` has the same API as a regular `<title>` tag—it accepts a `string` child. `<seo.title>` sets the page `<title>` as well as `<meta property="og:title">`.
653
654 #### seo.description
655
656 `<seo.description>` accepts a `string` child. `<seo.description>` sets `<meta name="description">` as well as `<meta property="og:description">`.
657
658 #### seo.canonical
659
660 `<seo.canonical>` accepts a `string` child representing the canonical URL of the current page. It generates `<link rel="canonical">` and `<meta property="og:url">`.
661
662 #### seo.image
663
664 `<seo.image>` exposes an API similar to the native `<img>`, accepting `src`, `alt`, `width`, and `height` props. It generates all the meta tags necessary for valid Open Graph images.
665
666 #### seo.video
667
668 `<seo.video>` exposes an API similar to the native `<video>`, accepting `src`, `width`, and `height` props. It generates all the meta tags necessary for valid Open Graph videos.
669
670 #### seo.audio
671
672 `<seo.audio>` exposes an API similar to the native `<audio>`, accepting only a `src` prop. It generates all the meta tags necessary for valid Open Graph audio.
673
674 #### seo.twitter
675
676 `<seo.twitter>` controls [Twitter meta tags](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup). It accepts `card`, `handle` (maps to `twitter:creator`), and `site`.
677
678 #### seo.facebook
679
680 `<seo.facebook>` accepts an `appId` in order to set `<meta property="fb:app_id">`.
681
682 #### seo.openGraph
683
684 `<seo.openGraph>` provides low-level control over [Open Graph meta tags](https://ogp.me/). The accepted props vary based on `type`, so you might want to dig [into the code](https://github.com/natemoo-re/microsite/blob/8c0599f8c05da3214534b864c536a2614a89fb7f/src/head.tsx#L14) for this one.
685
\No newline at end of file