[site,seo][s]: add description metadata to main pages

This commit is contained in:
João Demenech
2023-07-20 18:00:00 -03:00
parent 1f06c67d13
commit d198130038
7 changed files with 18 additions and 12 deletions

View File

@@ -32,6 +32,7 @@ export default function Page({ source, meta, sidebarTree }) {
<Layout
tableOfContents={tableOfContents}
title={meta.title}
description={meta.description}
sidebarTree={sidebarTree}
urlPath={meta.urlPath}
>

View File

@@ -3,12 +3,15 @@ import computeFields from '@/lib/computeFields';
import clientPromise from '@/lib/mddb';
import { BlogsList, SimpleLayout } from '@portaljs/core';
import * as fs from 'fs';
import {NextSeo} from 'next-seo';
import { NextSeo } from 'next-seo';
export default function Blog({ blogs }) {
return (
<>
<NextSeo title="Blog posts" />
<NextSeo
title="Blog posts"
description="Find news and more information about rapidly building rich data portals using a modern frontend framework in the PortalJS blog"
/>
<Layout>
<SimpleLayout title="Blog posts">
<BlogsList blogs={blogs} />
@@ -50,12 +53,9 @@ export async function getStaticProps() {
const blogList = await Promise.all(blogsWithComputedFields);
const blogsSorted = blogList.sort(
(a, b) =>
new Date(b?.date).getTime() -
new Date(a?.date).getTime()
(a, b) => new Date(b?.date).getTime() - new Date(a?.date).getTime()
);
return {
props: {
blogs: blogsSorted,