From b30a76165df51ad58c6c434b0ace5914b597a2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Wed, 13 Nov 2024 22:56:07 +0100 Subject: [PATCH] fix(public): minor tweaks --- apps/public/app/sitemap.ts | 15 +++++++++++---- apps/public/components/hero.tsx | 6 +++--- apps/public/components/navbar.tsx | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/apps/public/app/sitemap.ts b/apps/public/app/sitemap.ts index 12ce406a..ac629d16 100644 --- a/apps/public/app/sitemap.ts +++ b/apps/public/app/sitemap.ts @@ -1,10 +1,11 @@ -import { articleSource, source } from '@/lib/source'; +import { articleSource, pageSource, source } from '@/lib/source'; import type { MetadataRoute } from 'next'; import { url } from './layout.config'; -const articles = await articleSource.getPages(); -const docs = await source.getPages(); -export default function sitemap(): MetadataRoute.Sitemap { +export default async function sitemap(): Promise { + const articles = await articleSource.getPages(); + const docs = await source.getPages(); + const pages = await pageSource.getPages(); return [ { url: url('/'), @@ -36,5 +37,11 @@ export default function sitemap(): MetadataRoute.Sitemap { changeFrequency: 'monthly' as const, priority: 0.3, })), + ...pages.map((item) => ({ + url: url(item.url), + lastModified: item.data.lastModified, + changeFrequency: 'monthly' as const, + priority: 0.3, + })), ]; } diff --git a/apps/public/components/hero.tsx b/apps/public/components/hero.tsx index 40d608e2..a09c0c34 100644 --- a/apps/public/components/hero.tsx +++ b/apps/public/components/hero.tsx @@ -14,17 +14,17 @@ export function Hero() { {/* Content */}
-

+

An open-source alternative to Mixpanel

-

+

The power of Mixpanel, the ease of Plausible and nothing from Google Analytics 😉

{/* CTA */} -
+