Svead screenshot

Svead

Author Avatar Theme by Spences10
Updated: 28 Apr 2025
84 Stars

Svead , a component that allows you to set head meta information, canonical, title, Twitter and Facebook Open Graph tags, and schema.org data.

Overview:

The Svead component is a Svelte head component that allows users to set meta information, canonical, title, Twitter and Facebook Open Graph tags. It also supports JSON-LD for SEO. It takes several props including url, title, description, website, author name, image, payment pointer, date published, date modified, content type, and language. The component can be imported into Svelte pages and used to set the desired meta information for the page.

Features:

  • Meta Information: Set head meta information for the page.
  • Canonical URL: Set the canonical URL for the page.
  • Title: Set the title of the page.
  • Twitter and Facebook Open Graph Tags: Set tags for Twitter and Facebook Open Graph.

Installation:

To use the Svead component, follow these steps:

  1. Import the component into your Svelte pages using import Svead from 'svead';
  2. Create a new instance of the Svead component within your Svelte component.
  3. Pass the required props (url, title, and description) to the Svead component.
  4. Optionally, you can also pass additional props like website, authorName, image, paymentPointer, datePublished, dateModified, contentType, and language.
  5. Customize the meta information and tags according to your needs.
  6. Render the Svead component within the <head> section of your Svelte page.

Here is an example usage of the Svead component:

<script>
  import Svead from 'svead';
</script>

<Svead
  url="https://example.com"
  title="Example Page"
  description="This is an example page."
/>

Summary:

The Svead component is a useful tool for setting head meta information, canonical URLs, titles, and social media tags for Svelte pages. It provides an easy-to-use interface for managing and customizing these elements, allowing developers to optimize their pages for search engines and social media platforms. With support for JSON-LD, the component also enhances SEO by providing structured data to search engines. Overall, the Svead component is a valuable addition to any Svelte project.