Skip to content

Commit

Permalink
Merge pull request #15 from calimania/feature/seo-css
Browse files Browse the repository at this point in the history
Better CSS & SEO
  • Loading branch information
dvidsilva authored Dec 10, 2024
2 parents 1004c12 + eac5443 commit 99a4753
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
12 changes: 8 additions & 4 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ export interface Props {
scrollSmooth?: boolean;
post?: CollectionEntry<"posts">;
meta?: {
title: string;
image: string;
description: string;
title?: string;
image?: string;
description?: string;
url?: string;
};
}
Expand Down Expand Up @@ -122,7 +123,10 @@ const store = stores.find(
/>
<meta
property="og:url"
content={post?.data?.SEO?.metaUrl || store?.SEO?.metaUrl || canonicalURL}
content={meta?.url ||
post?.data?.SEO?.metaUrl ||
store?.SEO?.metaUrl ||
canonicalURL}
/>
<meta
property="og:image"
Expand Down
9 changes: 8 additions & 1 deletion src/pages/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ const store = stores.find(
const { page } = Astro.props;
---

<Layout>
<Layout
meta={{
title: page?.SEO?.metaTitle || page?.Title,
image: page?.SEO?.socialImage?.url,
description: page?.SEO?.metaDescription,
url: `/${page?.slug}`,
}}
>
<Header store={store} activeNav={page?.data?.slug as activeNav} />
<Breadcrumbs />
<main id="main-content">
Expand Down
9 changes: 9 additions & 0 deletions src/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ button.brand-yellow:hover {
background-color: white;
border-color: #0157ad !important;
}
.nav-container {
min-height: 120px;
}

@media (max-width: 640px) {
.logo {
width: 80px !important;
}
}
}

@layer components {
Expand Down

0 comments on commit 99a4753

Please sign in to comment.