SEO
Setup
Open
selfkit.config.js
located atsrc/lib
and find the App information and SEO section. All values in these sections will be used as default for SEO meta tags, Open graph and JSON-LD .To add custom SEO tags to a page (without rewritting everything), go to the
+page.server.ts
of a page you want to add tags.Then in the load function, do this:
export const load: PageServerLoad = async () => {
return {
pageName: 'Contact Us',
description: "Get in touch with our team.",
keywords: ['Contact', 'SelfKit'],
imgUrl: 'https://example.ie/mywebsite', // For Open graph, the image is display for twitter card and facebook
imgAlt: 'My website'
};
};
ts
NOTE
All parameters are optional, but I recommand to at least fill pageName
and description
.