Skip to content

Commit 54e3a4a

Browse files
committed
check if post
1 parent fc1e11b commit 54e3a4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/layouts/Layout.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const { title, description } = Astro.props;
2424
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
2525
<meta name="generator" content={Astro.generator} />
2626
<title>{title}</title>
27-
<script is:inline type="application/ld+json" set:html={
27+
{/^\/posts\/\w+\S+\/$/.test(Astro.url.pathname) && <script is:inline type="application/ld+json" set:html={
2828
blog({
2929
"@type": "BlogPosting",
3030
"headline": title,
@@ -34,7 +34,7 @@ const { title, description } = Astro.props;
3434
"inLanguage": "ar"
3535
})
3636
}>
37-
</script>
37+
</script>}
3838
</head>
3939
<body>
4040
<header class="navbar">

0 commit comments

Comments
 (0)