[site,seo][s]: review page titles

This commit is contained in:
João Demenech 2023-07-18 11:09:03 -03:00
parent 5088afe69a
commit cf6fab2c4f
7 changed files with 11 additions and 5 deletions

View File

@ -12,7 +12,6 @@ export default function MDXPage({ source, frontMatter }) {
return <LayoutComponent {...frontMatter}>{children}</LayoutComponent>;
};
return (
<Layout>
<MDXRemote {...source} components={{ DocsPagination, NextSeo, Hero }} />

View File

@ -1,6 +1,8 @@
---
showToc: false
showSidebar: false
title: "Markdown-based Websites Guide"
disableTitle: true
---
<Hero title="Markdown-based Websites" subtitle="Create markdown-based website, update it, add collaborators and discover markdown superpowers" />
@ -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!]]
> Read full tutorial [[edit-a-website-locally|here!]]

View File

@ -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?]]

View File

@ -6,7 +6,7 @@ export default function DefaultLayout({ children, ...frontMatter }) {
{/* Default layout */}
{!frontMatter.layout && (
<>
<h1>{frontMatter.title}</h1>
{!frontMatter.disableTitle && <h1>{frontMatter.title}</h1>}
{frontMatter.author && (
<div className="-mt-6">
<p className="opacity-60 pl-1">{frontMatter.author}</p>

View File

@ -13,7 +13,7 @@ export const DocsLayout: React.FC<any> = ({ children, ...frontMatter }) => {
<time dateTime={created}>{formatDate(created)}</time>
</p>
)}
{title && <h1>{title}</h1>}
{!frontMatter.disableTitle && title && <h1>{title}</h1>}
</div>
</header>
<section>{children}</section>

View File

@ -50,6 +50,7 @@ function MyApp({ Component, pageProps }) {
<DefaultSeo
defaultTitle={siteConfig.title}
description={siteConfig.description}
titleTemplate="PortalJS - %s"
{...siteConfig.nextSeo}
/>

View File

@ -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 (
<>
<NextSeo title="Blog posts" />
<Layout>
<SimpleLayout title="Blog posts">
<BlogsList blogs={blogs} />