1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-01-23 13:19:36 +01:00

fix: use Plausible

This commit is contained in:
Théo LUDWIG 2025-01-23 13:16:20 +01:00
parent e68cb08a6f
commit d91feb8de4
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B

View File

@ -9,6 +9,9 @@ import {
getTranslations, getTranslations,
setRequestLocale, setRequestLocale,
} from "next-intl/server" } from "next-intl/server"
import Script from "next/script"
const DOMAIN = "theoludwig.fr"
export const generateMetadata = async ({ export const generateMetadata = async ({
params, params,
@ -18,7 +21,7 @@ export const generateMetadata = async ({
const title = t("meta.title") const title = t("meta.title")
const description = `${title} - ${t("meta.description")}` const description = `${title} - ${t("meta.description")}`
const image = "/images/logo.webp" const image = "/images/logo.webp"
const url = new URL("https://theoludwig.fr") const url = new URL(`https://${DOMAIN}`)
const locales = LOCALES.join(", ") const locales = LOCALES.join(", ")
return { return {
@ -74,6 +77,12 @@ const LocaleLayout: React.FC<LocaleLayoutProps> = async (props) => {
<NextIntlClientProvider messages={messages}> <NextIntlClientProvider messages={messages}>
{children} {children}
</NextIntlClientProvider> </NextIntlClientProvider>
<Script
defer
data-domain={DOMAIN}
src="https://plausible.theoludwig.fr/js/script.js"
/>
</body> </body>
</html> </html>
) )