diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 0b2f3ba..d3efb4a 100755 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -38,6 +38,9 @@ export interface Props { // distructure frontmatters const { title, meta_title, description, image, noindex, canonical } = Astro.props; + +const titleFromProps = plainify(meta_title ? meta_title : title ? title : ''); +const pageTitle = titleFromProps ? `${titleFromProps} ยท ${config.site.title}` : config.site.title; --- @@ -100,7 +103,7 @@ const { title, meta_title, description, image, noindex, canonical } = - {plainify(meta_title ? meta_title : title ? title : config.site.title)} + {pageTitle}