feat(seo): discoverability + Schema.org + IndexNow + Trivy (#1)
All checks were successful
deploy / deploy (push) Successful in 3m7s
All checks were successful
deploy / deploy (push) Successful in 3m7s
This commit was merged in pull request #1.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import '../styles/global.css';
|
||||
import { SITE_TITLE, SITE_DESCRIPTION, SITE_URL, SITE_LANG, MAIN_NAV } from '../consts';
|
||||
import { SITE_TITLE, SITE_DESCRIPTION, SITE_URL, SITE_LANG, SITE_FOUNDED, MAIN_NAV, SOCIAL } from '../consts';
|
||||
import BrandMark from '../components/BrandMark.astro';
|
||||
import SocialLinks from '../components/SocialLinks.astro';
|
||||
import Analytics from '../components/Analytics.astro';
|
||||
@@ -17,6 +17,35 @@ const pageTitle = title ? `${title} — ${SITE_TITLE}` : SITE_TITLE;
|
||||
const pageDesc = description || SITE_DESCRIPTION;
|
||||
const canonical = new URL(Astro.url.pathname, SITE_URL).toString();
|
||||
const year = new Date().getFullYear();
|
||||
|
||||
const ogImage = new URL('/og-image.png', SITE_URL).toString();
|
||||
const logoUrl = new URL('/logo.svg', SITE_URL).toString();
|
||||
const jsonLd = [
|
||||
{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'WebSite',
|
||||
name: SITE_TITLE,
|
||||
url: SITE_URL,
|
||||
inLanguage: SITE_LANG,
|
||||
description: SITE_DESCRIPTION,
|
||||
potentialAction: {
|
||||
'@type': 'SearchAction',
|
||||
target: `${SITE_URL}/?s={query}`,
|
||||
'query-input': 'required name=query',
|
||||
},
|
||||
},
|
||||
{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'NewsMediaOrganization',
|
||||
name: SITE_TITLE,
|
||||
url: SITE_URL,
|
||||
logo: logoUrl,
|
||||
image: ogImage,
|
||||
description: SITE_DESCRIPTION,
|
||||
foundingDate: String(SITE_FOUNDED),
|
||||
sameAs: Object.values(SOCIAL).map((s) => s.url),
|
||||
},
|
||||
];
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang={SITE_LANG}>
|
||||
@@ -46,6 +75,8 @@ const year = new Date().getFullYear();
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title={`${SITE_TITLE} — RSS`} href="/feed.xml" />
|
||||
|
||||
<script type="application/ld+json" is:inline set:html={JSON.stringify(jsonLd)} />
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Cormorant+Garamond:wght@500;600;700&display=swap" rel="stylesheet" />
|
||||
|
||||
Reference in New Issue
Block a user