Skip to content

Commit

Permalink
Merge pull request #447 from taroj1205/fix/seo
Browse files Browse the repository at this point in the history
  • Loading branch information
mauro-balades authored Jan 31, 2025
2 parents 1fa3bcb + 10f80eb commit 2f502f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
interface Props {
title: string
isHome?: boolean
}
const { title } = Astro.props
const onHomepage = Astro.url.origin === 'https://zen-browser.app/'
const { title, isHome } = Astro.props
import '@fontsource/bricolage-grotesque/400.css'
import NavBar from '../components/NavBar.astro'
import Footer from '../components/Footer.astro'
Expand Down Expand Up @@ -38,9 +38,9 @@ import Footer from '../components/Footer.astro'
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="sitemap" href="/sitemap-0.xml" />

<!-- Injecting schema to homepage only (for SEO) -->
{onHomepage && (
<script type="application/ld+json">
{isHome && (
<!-- Injecting schema to homepage only (for SEO) -->
<script is:inline type="application/ld+json">
{{
"@context":"https://schema.org",
"@type":"WebSite",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Features from '../components/Features.astro'
import HomeExtras from '../components/HomeExtras.astro'
---

<Layout title="Zen Browser">
<Layout title="Zen Browser" isHome>
<main>
<Hero />
<Community />
Expand Down

0 comments on commit 2f502f5

Please sign in to comment.