SEO and language tests

This commit is contained in:
Henrik Larsson
2023-05-05 14:11:25 +02:00
parent 7dc550291e
commit 182e245fd7
6 changed files with 62 additions and 186 deletions

View File

@@ -6,13 +6,29 @@ import { notFound } from 'next/navigation';
import { ReactNode } from 'react';
import './globals.css';
const { TWITTER_CREATOR, TWITTER_SITE, SITE_NAME } = process.env;
const SITE_NAME = "KM Storefront"
const SITE_DESCRIPTION = "Webb och digitalbyrå från Göteborg"
const TWITTER_CREATOR = "@kodamera.se"
const TWITTER_SITE = "https://kodamera.se"
const OG_IMAGE_URL = "/og-image.jpg"
const OG_IMAGE_ALT = "Kodamera"
export const metadata = {
title: {
default: SITE_NAME,
template: `%s | ${SITE_NAME}`
},
description: SITE_DESCRIPTION,
openGraph: {
images: [
{
url: OG_IMAGE_URL,
width: 1200,
height: 630,
alt: OG_IMAGE_ALT
},
],
},
robots: {
follow: true,
index: true
@@ -34,7 +50,7 @@ const inter = Inter({
});
export function generateStaticParams() {
return [{locale: 'sv'}, {locale: 'en'}, {locale: 'nn'}];
return [{locale: 'sv'}, {locale: 'en'}];
}
interface LocaleLayoutProps {
@@ -46,6 +62,7 @@ interface LocaleLayoutProps {
export default async function LocaleLayout({children, params: {locale}}: LocaleLayoutProps) {
let messages;
try {
messages = (await import(`../../messages/${locale}.json`)).default;
} catch (error) {