diff --git a/greenlns-landing/Caddyfile b/greenlns-landing/Caddyfile index 074e386..29f71af 100644 --- a/greenlns-landing/Caddyfile +++ b/greenlns-landing/Caddyfile @@ -1,18 +1,18 @@ -{$SITE_DOMAIN} { - encode zstd gzip - - @storage path /storage /storage/* - handle @storage { - uri strip_prefix /storage - reverse_proxy minio:9000 - } - - @api path /api /api/* /auth /auth/* /v1 /v1/* /health /plants /plants/* - handle @api { - reverse_proxy api:3000 - } - - handle { - reverse_proxy landing:3000 - } -} +{$SITE_DOMAIN} { + encode zstd gzip + + @storage path /storage /storage/* + handle @storage { + uri strip_prefix /storage + reverse_proxy minio:9000 + } + + @api path /api /api/* /auth /auth/* /v1 /v1/* /health /plants /plants/* + handle @api { + reverse_proxy api:3000 + } + + handle { + reverse_proxy landing:3000 + } +} diff --git a/greenlns-landing/app/de/[slug]/page.tsx b/greenlns-landing/app/de/[slug]/page.tsx new file mode 100644 index 0000000..fd81419 --- /dev/null +++ b/greenlns-landing/app/de/[slug]/page.tsx @@ -0,0 +1,21 @@ +import { notFound, permanentRedirect } from 'next/navigation' +import { getGermanSeoPageBySlug, germanSeoPageSlugs } from '@/lib/seoPages' + +type GermanSeoRouteProps = { + params: Promise<{ slug: string }> +} + +export function generateStaticParams() { + return germanSeoPageSlugs.map((slug) => ({ slug })) +} + +export default async function GermanSeoRoute({ params }: GermanSeoRouteProps) { + const { slug } = await params + const profile = getGermanSeoPageBySlug(slug) + + if (!profile) { + notFound() + } + + permanentRedirect(`/${slug}`) +} diff --git a/greenlns-landing/app/de/page.tsx b/greenlns-landing/app/de/page.tsx new file mode 100644 index 0000000..3ec88d6 --- /dev/null +++ b/greenlns-landing/app/de/page.tsx @@ -0,0 +1,5 @@ +import { permanentRedirect } from 'next/navigation' + +export default function GermanHomeRedirect() { + permanentRedirect('/') +} diff --git a/greenlns-landing/app/es/[slug]/page.tsx b/greenlns-landing/app/es/[slug]/page.tsx new file mode 100644 index 0000000..9822bd4 --- /dev/null +++ b/greenlns-landing/app/es/[slug]/page.tsx @@ -0,0 +1,64 @@ +import type { Metadata } from 'next' +import { notFound } from 'next/navigation' +import SeoCategoryPage from '@/components/SeoCategoryPage' +import { getSpanishSeoPageBySlug, spanishSeoPageSlugs } from '@/lib/spanishSeoPages' +import { siteConfig } from '@/lib/site' + +type SpanishSeoRouteProps = { + params: Promise<{ slug: string }> +} + +export function generateStaticParams() { + return spanishSeoPageSlugs + .filter((slug) => slug !== 'comparar-google-lens') + .map((slug) => ({ slug })) +} + +export async function generateMetadata({ params }: SpanishSeoRouteProps): Promise { + const { slug } = await params + if (slug === 'comparar-google-lens') { + notFound() + } + const profile = getSpanishSeoPageBySlug(slug) + + if (!profile) { + return {} + } + + return { + title: profile.metaTitle, + description: profile.metaDescription, + alternates: { + canonical: profile.canonical, + languages: { + es: profile.canonical, + 'x-default': '/', + }, + }, + openGraph: { + title: profile.metaTitle, + description: profile.metaDescription, + url: `${siteConfig.domain}${profile.canonical}`, + type: 'website', + locale: 'es_ES', + images: [{ url: '/og-image.png', width: 1200, height: 630, alt: profile.metaTitle }], + }, + twitter: { + card: 'summary_large_image', + title: profile.metaTitle, + description: profile.metaDescription, + images: ['/og-image.png'], + }, + } +} + +export default async function SpanishSeoRoute({ params }: SpanishSeoRouteProps) { + const { slug } = await params + const profile = getSpanishSeoPageBySlug(slug) + + if (!profile) { + notFound() + } + + return +} diff --git a/greenlns-landing/app/es/comparar/google-lens/page.tsx b/greenlns-landing/app/es/comparar/google-lens/page.tsx new file mode 100644 index 0000000..daf8690 --- /dev/null +++ b/greenlns-landing/app/es/comparar/google-lens/page.tsx @@ -0,0 +1,40 @@ +import type { Metadata } from 'next' +import { notFound } from 'next/navigation' +import SeoCategoryPage from '@/components/SeoCategoryPage' +import { getSpanishSeoPageBySlug } from '@/lib/spanishSeoPages' +import { siteConfig } from '@/lib/site' + +const profile = getSpanishSeoPageBySlug('comparar-google-lens') + +export const metadata: Metadata = !profile + ? {} + : { + title: profile.metaTitle, + description: profile.metaDescription, + alternates: { + canonical: profile.canonical, + languages: { + es: profile.canonical, + 'x-default': '/', + }, + }, + openGraph: { + title: profile.metaTitle, + description: profile.metaDescription, + url: `${siteConfig.domain}${profile.canonical}`, + type: 'website', + locale: 'es_ES', + images: [{ url: '/og-image.png', width: 1200, height: 630, alt: profile.metaTitle }], + }, + twitter: { + card: 'summary_large_image', + title: profile.metaTitle, + description: profile.metaDescription, + images: ['/og-image.png'], + }, + } + +export default function SpanishGoogleLensComparisonPage() { + if (!profile) notFound() + return +} diff --git a/greenlns-landing/app/es/page.tsx b/greenlns-landing/app/es/page.tsx new file mode 100644 index 0000000..abd9e53 --- /dev/null +++ b/greenlns-landing/app/es/page.tsx @@ -0,0 +1,81 @@ +import type { Metadata } from 'next' +import Link from 'next/link' +import Navbar from '@/components/Navbar' +import Footer from '@/components/Footer' +import { siteConfig } from '@/lib/site' +import { spanishSeoPageProfiles } from '@/lib/spanishSeoPages' + +export const metadata: Metadata = { + title: 'GreenLens en español - Identificar y cuidar plantas', + description: + 'GreenLens en español: identifica plantas por foto, organiza cuidados, recibe recordatorios y diagnostica sintomas comunes.', + alternates: { + canonical: '/es', + languages: { + es: '/es', + 'x-default': '/', + }, + }, + openGraph: { + title: 'GreenLens en español - Identificar y cuidar plantas', + description: + 'Identifica plantas por foto, organiza cuidados, recibe recordatorios y diagnostica sintomas comunes con GreenLens.', + url: `${siteConfig.domain}/es`, + type: 'website', + locale: 'es_ES', + }, +} + +const pages = [ + spanishSeoPageProfiles['identificador-de-plantas'], + spanishSeoPageProfiles['escaner-de-plantas'], + spanishSeoPageProfiles['app-para-cuidar-plantas'], + spanishSeoPageProfiles['diagnosticar-enfermedades-plantas'], + spanishSeoPageProfiles['comparar-google-lens'], +] + +export default function SpanishHomePage() { + return ( + <> + +
+
+
+
+

GreenLens en español

+

Identifica, cuida y rescata tus plantas con mas claridad.

+

+ Escanea una planta, entiende que necesita y organiza cuidados, recordatorios y diagnostico desde una sola app. +

+ +
+ + +
+
+ +
+
+ {pages.map((page) => ( + +

Guia

+

{page.h1}

+

{page.metaDescription}

+ + ))} +
+
+
+