Sveo screenshot

Sveo

Author Avatar Theme by Didier
Updated: 26 Oct 2021
24 Stars

Declare metadata on SvelteKit pages, for example for SEO. Work in progress!

Categories

Overview

SVEO is a dependency-free approach to declare metadata on SvelteKit pages, specifically for SEO purposes. It allows you to pass data from page components to the layout component and works seamlessly with MDSveX. However, it should be noted that SVEO is not yet production-ready and may not build properly, so caution should be exercised when using it.

Features

  • Dependency-free: SVEO does not rely on any external dependencies, making it lightweight and easy to use.
  • Metadata Declaration: Allows you to declare metadata on SvelteKit pages for SEO purposes.
  • Passing Data to Layout Component: Enables you to pass data from page components to the layout component.
  • MDSveX Compatibility: Works out of the box with MDSveX, streamlining the process of declaring metadata.
  • Sveo Component: Provides a convenient way to template meta tags, Twitter cards, OpenGraph, and more.

Installation

To install and use SVEO, follow these steps:

  1. Create or edit a __layout.svelte file inside your routes folder.
  2. In your markup, utilize the title property as desired.
  3. Define metadata in your route’s <script module="context">.

Here is an example of how to install SVEO:

npm install sveo

Summary

SVEO is a helpful tool for declaring metadata on SvelteKit pages, particularly for SEO purposes. It offers a lightweight and dependency-free approach, allowing you to pass data from page components to the layout component. The integration with MDSveX further simplifies the metadata declaration process. However, it should be noted that SVEO is still in development and may not be suitable for production use yet.