fix: исправить типизацию, добавить SEO метатеги, исправить API Rules PB
- Добавлены типы PostVotes, VoteStats, Comment, Consultation, PostResponse - Заменены все any на конкретные типы - Исправлены catch (error: any) -> catch (error: unknown) - Добавлены og: и twitter: метатеги в Layout - Исправлены API Rules в PocketBase (posts, reviews, post_votes)
This commit is contained in:
parent
2f57bf91ef
commit
b5d2174fdf
20 changed files with 110 additions and 41 deletions
|
|
@ -14,9 +14,10 @@ export interface Props {
|
|||
description: string;
|
||||
canonicalLink?: string;
|
||||
breadcrumbs?: Array<{ label: string; href?: string }>;
|
||||
ogImage?: string;
|
||||
}
|
||||
|
||||
const { title, description, canonicalLink, breadcrumbs } = Astro.props;
|
||||
const { title, description, canonicalLink, breadcrumbs, ogImage } = Astro.props;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
|
|
@ -32,6 +33,17 @@ const { title, description, canonicalLink, breadcrumbs } = Astro.props;
|
|||
<title>{title} {SITE_TITLE_SUFFIX}</title>
|
||||
<meta name="description" content={description} />
|
||||
{canonicalLink && <link rel="canonical" href={canonicalLink} />}
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:type" content="website" />
|
||||
{canonicalLink && <meta property="og:url" content={canonicalLink} />}
|
||||
{ogImage && <meta property="og:image" content={ogImage} />}
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={title} />
|
||||
<meta name="twitter:description" content={description} />
|
||||
{ogImage && <meta name="twitter:image" content={ogImage} />}
|
||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||
<!-- Yandex верификация -->
|
||||
<meta name="yandex-verification" content="be3edfd138348e43" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue