mirror of
https://github.com/spliit-app/spliit.git
synced 2025-12-06 09:29:39 +01:00
Add Plausible
This commit is contained in:
@@ -20,6 +20,7 @@ Spliit is a free and open source alternative to Splitwise. I created it back in
|
||||
- [Next.js](https://nextjs.org/) for the web application
|
||||
- [TailwindCSS](https://tailwindcss.com/) for the styling
|
||||
- [shadcn/UI](https://ui.shadcn.com/) for the UI components
|
||||
- [Prisma](https://prisma.io) to access the database
|
||||
- [Vercel](https://vercel.com/) for hosting (application and database)
|
||||
|
||||
## Contribute
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {}
|
||||
|
||||
module.exports = nextConfig
|
||||
const { withPlausibleProxy } = require('next-plausible')
|
||||
module.exports = withPlausibleProxy()(nextConfig)
|
||||
|
||||
14
package-lock.json
generated
14
package-lock.json
generated
@@ -24,6 +24,7 @@
|
||||
"clsx": "^2.0.0",
|
||||
"lucide-react": "^0.290.0",
|
||||
"next": "^14.0.4",
|
||||
"next-plausible": "^3.12.0",
|
||||
"next-themes": "^0.2.1",
|
||||
"next13-progressbar": "^1.1.1",
|
||||
"pg": "^8.11.3",
|
||||
@@ -4242,6 +4243,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/next-plausible": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/next-plausible/-/next-plausible-3.12.0.tgz",
|
||||
"integrity": "sha512-SSkEqKQ6PgR8fx3sYfIAT69k2xuCUXO5ngkSS19CjxY97lAoZxsfZpYednxB4zo0mHYv87JzhPynrdBPlCBVHg==",
|
||||
"funding": {
|
||||
"url": "https://github.com/4lejandrito/next-plausible?sponsor=1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"next": "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
||||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/next-themes": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.2.1.tgz",
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"clsx": "^2.0.0",
|
||||
"lucide-react": "^0.290.0",
|
||||
"next": "^14.0.4",
|
||||
"next-plausible": "^3.12.0",
|
||||
"next-themes": "^0.2.1",
|
||||
"next13-progressbar": "^1.1.1",
|
||||
"pg": "^8.11.3",
|
||||
|
||||
@@ -4,6 +4,7 @@ import { ThemeToggle } from '@/components/theme-toggle'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { env } from '@/lib/env'
|
||||
import type { Metadata, Viewport } from 'next'
|
||||
import PlausibleProvider from 'next-plausible'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import './globals.css'
|
||||
@@ -63,6 +64,9 @@ export default function RootLayout({
|
||||
}) {
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
{env.PLAUSIBLE_DOMAIN && (
|
||||
<PlausibleProvider domain={env.PLAUSIBLE_DOMAIN} trackOutboundLinks />
|
||||
)}
|
||||
<body className="pt-16 min-h-[100dvh] flex flex-col items-stretch">
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
|
||||
@@ -4,6 +4,7 @@ const envSchema = z.object({
|
||||
NEXT_PUBLIC_BASE_URL: z.string().url(),
|
||||
POSTGRES_URL_NON_POOLING: z.string().url(),
|
||||
POSTGRES_PRISMA_URL: z.string().url(),
|
||||
PLAUSIBLE_DOMAIN: z.string().optional(),
|
||||
})
|
||||
|
||||
export const env = envSchema.parse(process.env)
|
||||
|
||||
Reference in New Issue
Block a user