public: feature pages
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { getAllCompareSlugs, getCompareData } from '@/lib/compare';
|
||||
import { getFeatureData } from '@/lib/features';
|
||||
import { url as baseUrl } from '@/lib/layout.shared';
|
||||
import { articleSource, guideSource, pageSource, source } from '@/lib/source';
|
||||
import { ImageResponse } from 'next/og';
|
||||
@@ -83,6 +84,22 @@ async function getOgData(
|
||||
description: 'Step-by-step tutorials for adding analytics to your app',
|
||||
};
|
||||
}
|
||||
case 'features': {
|
||||
const slug = segments[1];
|
||||
if (!slug) {
|
||||
return {
|
||||
title: 'Product analytics features',
|
||||
description:
|
||||
'Explore OpenPanel features: event tracking, funnels, retention, user profiles, and more.',
|
||||
};
|
||||
}
|
||||
const featureData = await getFeatureData(slug);
|
||||
return {
|
||||
title: featureData?.seo.title ?? 'Feature Not Found',
|
||||
description:
|
||||
featureData?.seo.description ?? featureData?.hero.subheading,
|
||||
};
|
||||
}
|
||||
case 'docs': {
|
||||
const data = await source.getPage(segments.slice(1));
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user