0.0.6 • Published 1 year ago

@anthony809/svelte-head v0.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Svelte head is a component to easily add and update svelte route pages's meta information.

Install component

npm install @anthony809/svelte-head

Import component

import SvelteHead from "@anthony809/svelte-head";

How to use SvelteHead

Import SvelteHead from "@anthony809/svelte-head"

import SvelteHead from "@anthony809/svelte-head";

Data needed for SvelteHead

const pageData = {
    appName:"svelte",
    favicon:"/favicon.png",
    title:"Home page",
    description:"Svelte head is a component to easily add and update svelte route pages's meta information."
}

Set meta data for route's page

<script>
    const pageData = {
        appName:"svelte",
        favicon:"/favicon.png",
        title:"Home page",
        description:"Svelte head is a component to easily add and update svelte route pages's meta information."
    }
</script>

<SvelteHead {...pageData}/>

Other props for SvelteHead

/** Your app name */
export let appName:string
/** Your app favicon */
export let favicon:string
/** Page title */
export let title:string
/** Page description */
export let description:string
/** Page image backdrop */
export let backdrop:string|undefined = undefined
/** Page Keywords */
export let keywords:string[]|undefined = undefined
/** Page type (Default:website) */
export let ogType:string = 'website'
/** Page location (Default:en_US) */
export let ogLocate:string = 'en_US'
0.0.5

1 year ago

0.0.4

1 year ago

0.0.6

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago