Install and configure
Edit this pagePrerequisites
If using Solid v1.0
, use version 0.27.x
or greater.
For earlier versions (eg. v0.x
), you must use v0.26.x
.
Installation
To get started, install using your preferred package manager.
Setup
- Wrap your application with
<MetaProvider />
- To include head tags within your application, render any of the following:
- These components can be used multiple times within the application.
- If using SolidJS on the server with JSX, no additional configuration is required.
Here is an example of how your code might look after this setup.
On the server, tags are collected, and then on the client, server-generated tags are replaced with those rendered on the client side. This process is important for maintaining the expected behavior, such as Single Page Applications (SPAs) when pages load that require changes to the head tags.
However, you can manage asset insertion using getAssets
from solid-js/web
.