[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

@@ -54,12 +54,14 @@ function useTableOfContents(tableOfContents) {
export default function Layout({ export default function Layout({
children, children,
title, title,
description,
tableOfContents = [], tableOfContents = [],
isHomePage = false, isHomePage = false,
sidebarTree = [], sidebarTree = [],
}: { }: {
children; children;
title?: string; title?: string;
description?: string;
tableOfContents?; tableOfContents?;
urlPath?: string; urlPath?: string;
sidebarTree?: []; sidebarTree?: [];
@@ -82,7 +84,7 @@ export default function Layout({
return ( return (
<> <>
{title && <NextSeo title={title} />} {title && <NextSeo title={title} description={description} />}
<Nav /> <Nav />
<div className="mx-auto p-6 bg-background dark:bg-background-dark"> <div className="mx-auto p-6 bg-background dark:bg-background-dark">
{isHomePage && <Hero />} {isHomePage && <Hero />}

View File

@@ -1,7 +1,7 @@
const config = { const config = {
title: 'PortalJS - The JavaScript framework for data portals.', title: 'PortalJS - The JavaScript framework for data portals.',
description: description:
'PortalJS is a framework for rapidly building rich data portal frontends using a modern frontend approach.', 'PortalJS is a JavaScript framework for rapidly building rich data portal frontends using a modern frontend approach.',
theme: { theme: {
default: 'dark', default: 'dark',
toggleIcon: '/images/theme-button.svg', toggleIcon: '/images/theme-button.svg',

View File

@@ -1,6 +1,7 @@
<NextSeo title="Getting Started - PortalJS" /> ---
title: Getting Started
# Getting Started description: "Getting started guide and tutorial about data portal-building with PortalJS"
---
Welcome to the PortalJS documentation! Welcome to the PortalJS documentation!

View File

@@ -3,6 +3,7 @@ showToc: false
showSidebar: false showSidebar: false
title: "Markdown-based Websites Guide" title: "Markdown-based Websites Guide"
disableTitle: true disableTitle: true
description: Create markdown-based websites and data portals, update it, add collaborators and discover markdown superpowers with Flowershow and PortalJS
--- ---
<Hero title="Markdown-based Websites" subtitle="Create markdown-based website, update it, add collaborators and discover markdown superpowers" /> <Hero title="Markdown-based Websites" subtitle="Create markdown-based website, update it, add collaborators and discover markdown superpowers" />

View File

@@ -1,5 +1,6 @@
--- ---
title: Guides and Tutorials title: Guides and Tutorials
description: Learn more about how you can achieve different data portal features with PortalJS
--- ---
- [[howtos/analytics|How to add web analytics?]] - [[howtos/analytics|How to add web analytics?]]

View File

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

View File

@@ -8,7 +8,10 @@ import {NextSeo} from 'next-seo';
export default function Blog({ blogs }) { export default function Blog({ blogs }) {
return ( 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> <Layout>
<SimpleLayout title="Blog posts"> <SimpleLayout title="Blog posts">
<BlogsList blogs={blogs} /> <BlogsList blogs={blogs} />
@@ -50,12 +53,9 @@ export async function getStaticProps() {
const blogList = await Promise.all(blogsWithComputedFields); const blogList = await Promise.all(blogsWithComputedFields);
const blogsSorted = blogList.sort( const blogsSorted = blogList.sort(
(a, b) => (a, b) => new Date(b?.date).getTime() - new Date(a?.date).getTime()
new Date(b?.date).getTime() -
new Date(a?.date).getTime()
); );
return { return {
props: { props: {
blogs: blogsSorted, blogs: blogsSorted,