Set default titleTemplate
This commit is contained in:
@ -11,6 +11,10 @@ import SplitbeeAnalytics from './SplitbeeAnalytics.astro';
|
||||
|
||||
import { MetaSEO } from '~/types';
|
||||
|
||||
export interface Props extends MetaSEO {
|
||||
dontUseTitleTemplate?: boolean;
|
||||
}
|
||||
|
||||
const defaultImage = SITE.defaultImage
|
||||
? (
|
||||
await getImage({
|
||||
@ -22,8 +26,6 @@ const defaultImage = SITE.defaultImage
|
||||
).src
|
||||
: '';
|
||||
|
||||
export interface Props extends MetaSEO {}
|
||||
|
||||
const {
|
||||
title = SITE.name,
|
||||
description = '',
|
||||
@ -35,6 +37,8 @@ const {
|
||||
|
||||
ogTitle = title,
|
||||
ogType = 'website',
|
||||
|
||||
dontUseTitleTemplate = false,
|
||||
} = Astro.props;
|
||||
|
||||
const image =
|
||||
@ -51,6 +55,7 @@ const image =
|
||||
|
||||
<AstroSeo
|
||||
title={title}
|
||||
titleTemplate={dontUseTitleTemplate ? '%s' : `%s — ${SITE.name}`}
|
||||
description={description}
|
||||
canonical={String(canonical)}
|
||||
noindex={noindex}
|
||||
|
Reference in New Issue
Block a user