From cf6fab2c4f78608146e7013b071763cdb32135ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Demenech?= Date: Tue, 18 Jul 2023 11:09:03 -0300 Subject: [PATCH] [site,seo][s]: review page titles --- site/components/MDXPage.tsx | 1 - site/content/guide/index.md | 4 +++- site/content/howtos/index.md | 4 +++- site/layouts/default.tsx | 2 +- site/layouts/docs.tsx | 2 +- site/pages/_app.tsx | 1 + site/pages/blog.tsx | 2 ++ 7 files changed, 11 insertions(+), 5 deletions(-) diff --git a/site/components/MDXPage.tsx b/site/components/MDXPage.tsx index 913887c3..31e060e1 100644 --- a/site/components/MDXPage.tsx +++ b/site/components/MDXPage.tsx @@ -12,7 +12,6 @@ export default function MDXPage({ source, frontMatter }) { return {children}; }; - return ( diff --git a/site/content/guide/index.md b/site/content/guide/index.md index d991dfb3..6bd11b3f 100644 --- a/site/content/guide/index.md +++ b/site/content/guide/index.md @@ -1,6 +1,8 @@ --- showToc: false showSidebar: false +title: "Markdown-based Websites Guide" +disableTitle: true --- @@ -79,4 +81,4 @@ Below is a screenshot of how the final website will look like: - Visit the site! Yay! Your changes are live! 🎉 > [!tip] -> Read full tutorial [[edit-a-website-locally|here!]] \ No newline at end of file +> Read full tutorial [[edit-a-website-locally|here!]] diff --git a/site/content/howtos/index.md b/site/content/howtos/index.md index b5d16d1c..c73760e8 100644 --- a/site/content/howtos/index.md +++ b/site/content/howtos/index.md @@ -1,4 +1,6 @@ -# Guides and tutorials +--- +title: Guides and Tutorials +--- - [[howtos/analytics|How to add web analytics?]] - [[howtos/seo|How to customize page metadata for SEO?]] diff --git a/site/layouts/default.tsx b/site/layouts/default.tsx index ac4525f5..09d2919b 100644 --- a/site/layouts/default.tsx +++ b/site/layouts/default.tsx @@ -6,7 +6,7 @@ export default function DefaultLayout({ children, ...frontMatter }) { {/* Default layout */} {!frontMatter.layout && ( <> -

{frontMatter.title}

+ {!frontMatter.disableTitle &&

{frontMatter.title}

} {frontMatter.author && (

{frontMatter.author}

diff --git a/site/layouts/docs.tsx b/site/layouts/docs.tsx index e08f5d69..612eebf2 100644 --- a/site/layouts/docs.tsx +++ b/site/layouts/docs.tsx @@ -13,7 +13,7 @@ export const DocsLayout: React.FC = ({ children, ...frontMatter }) => {

)} - {title &&

{title}

} + {!frontMatter.disableTitle && title &&

{title}

}
{children}
diff --git a/site/pages/_app.tsx b/site/pages/_app.tsx index 427e0a2b..00133045 100644 --- a/site/pages/_app.tsx +++ b/site/pages/_app.tsx @@ -50,6 +50,7 @@ function MyApp({ Component, pageProps }) { diff --git a/site/pages/blog.tsx b/site/pages/blog.tsx index e15552b1..9a723cba 100644 --- a/site/pages/blog.tsx +++ b/site/pages/blog.tsx @@ -3,10 +3,12 @@ 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'; export default function Blog({ blogs }) { return ( <> +