Added SEO to website pages (#5106)

Added SEO to Contributors, Contributor, User Guide (+ each of it's
pages), Changelog, OSS friends: titles, descriptions

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
This commit is contained in:
Ady Beraud
2024-04-24 09:13:59 +03:00
committed by GitHub
parent dc82ff56b8
commit fda0c3c93c
8 changed files with 59 additions and 8 deletions

View File

@ -0,0 +1,6 @@
import { getPost } from '@/app/_server-utils/get-posts';
export async function fetchArticleFromSlug(slug: string, basePath: string) {
const effectiveSlug = slug && slug.length > 0 ? slug : 'home';
return await getPost(effectiveSlug, basePath);
}

View File

@ -0,0 +1,6 @@
export function formatSlug(slug: string): string {
return slug
.split('-')
.map((word: string) => word?.charAt(0)?.toUpperCase?.() + word?.slice?.(1))
.join(' ');
}