mirror of
https://github.com/KevinMidboe/planetposen-frontend.git
synced 2026-02-15 03:39:06 +00:00
Feat: JsonLd product metadata (#2)
* Generates JSON ld structured metadata from a product & appends to head * Updated IProduct & IVariation interface * Added IProductResponse & IProductsResponse interfaces * Fixed sitemap urls having to many protocols
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { dev } from '$app/environment';
|
||||
import { env } from '$env/dynamic/private';
|
||||
import type { IProductResponse } from '$lib/interfaces/ApiResponse';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = async ({ fetch, params }) => {
|
||||
@@ -11,6 +12,6 @@ export const load: PageServerLoad = async ({ fetch, params }) => {
|
||||
}
|
||||
|
||||
const res = await fetch(url);
|
||||
const product = await res.json();
|
||||
const product: IProductResponse = await res.json();
|
||||
return product;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user