Skip to content

Commit

Permalink
docs: added types guide for v0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDahoom committed Nov 18, 2024
1 parent 1ea77fd commit 5edd69e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ Add the component to your layout file (eg: `+layout.svelte`).
<Seo />
```
This component makes use of `$page.data` **stores**. So we should use some load functions.
> [!NOTE]
> These will be automatically picked up by the component and used to fill in the meta tags.

Add a `+layout.js` file alongside your `+layout.svelte` with a load function and return data with the
SEO/Meta that you need:
> [!TIP]
> For type support follow this [guide](https://github.com/TheDahoom/Sveltekit-seo/wiki/v0.5--types)
```js
// +layout.js
export const load = async ({ url }) => {
Expand Down Expand Up @@ -148,6 +147,7 @@ The component uses `<svelte:head>` to place meta tags that are filled with svelt
```svelte
<meta property="og:url" content="{$page.url}">
```
Since v0.5 the component also makes use of `$page.data` **stores**. These will be automatically picked up by the component and used to fill in the meta tags

## Extendable
If you want to use an unusual meta tag or use your own custom one (eg: google site verification). It's easy as:
Expand Down Expand Up @@ -194,4 +194,4 @@ If you're behind `Cloudflare` and find yourself with duplicated meta tags, then
## As seen on
[Svelte Blog](https://svelte.dev/blog/whats-new-in-svelte-may-2024)
[The Guardian](https://youtu.be/iik25wqIuFo)
[New York Times](https://youtu.be/iik25wqIuFo)
[New York Times](https://youtu.be/iik25wqIuFo)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sk-seo",
"version": "0.5.0-next",
"version": "0.5.1-next",
"description": "A lightweight, no depenencies, Sveltekit SEO component to save your time",
"main": "SEO.svelte",
"exports": {
Expand Down

0 comments on commit 5edd69e

Please sign in to comment.