Add support for meta tags (#14)

* feat: added support for head meta tags

* doc: update tutorial

* feat: add support to no css manifest entries

* feat: update version to v0.5.0

* doc: add mention to add the imports field

* feat: add filter to workspace package.json

* fix: add types declarations for react-meta-tags
This commit is contained in:
Valerio Ageno
2024-07-13 12:09:56 +02:00
committed by GitHub
parent 227662489b
commit 78990d3c08
14 changed files with 200 additions and 20 deletions
+4 -1
View File
@@ -1,5 +1,5 @@
// src/routes/index.tsx
import type { TuonoProps } from 'tuono'
import { Head, type TuonoProps } from 'tuono'
import PokemonLink from '../components/PokemonLink'
interface Pokemon {
@@ -19,6 +19,9 @@ export default function IndexPage({
return (
<>
<Head>
<title>Tuono tutorial</title>
</Head>
<header className="header">
<a href="https://crates.io/crates/tuono" target="_blank">
Crates
@@ -1,4 +1,4 @@
import type { TuonoProps } from 'tuono'
import { Head, type TuonoProps } from 'tuono'
import PokemonView from '../../components/PokemonView'
interface Pokemon {
@@ -11,5 +11,12 @@ interface Pokemon {
export default function PokemonPage({
data,
}: TuonoProps<Pokemon>): JSX.Element {
return <PokemonView pokemon={data} />
return (
<>
<Head>
<title>Pokemon: {data?.name}</title>
</Head>
<PokemonView pokemon={data} />
</>
)
}