Skip to content

Commit

Permalink
SEO & fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
surjithctly committed Nov 9, 2022
1 parent f4f0e2b commit 4e0e135
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"astro": "^1.6.0",
"astro-feather-icons": "^1.0.2",
"astro-icon": "^0.8.0",
"astro-seo": "^0.6.0",
"tailwindcss": "^3.0.24"
},
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/opengraph.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 18 additions & 3 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
// import { getImage } from "@astrojs/image";
import { SEO } from "astro-seo";
import Footer from "@components/footer.astro";
import Navbar from "@components/navbar/navbar.astro";
import "@fontsource/inter/variable.css";
Expand All @@ -14,7 +14,7 @@ export interface Props {
// format: "avif",
// });
// console.log(src);
const resolvedImageWithDomain = new URL("/opengraph.jpg", Astro.url).toString();
const { title } = Astro.props;
---

Expand All @@ -27,7 +27,22 @@ const { title } = Astro.props;
<meta name="generator" content={Astro.generator} />

<!-- <link rel="preload" as="image" href={src} alt="Hero" /> -->
<title>{title} {title && "|"} Astro Ship</title>
<SEO
title={`${title}${title && " | "}Astro Ship`}
description="Astroship is a starter website template for Astro built with TailwindCSS."
twitter={{
creator: "@surjithctly",
site: "@web3templates",
card: "summary_large_image",
}}
openGraph={{
basic: {
type: "website",
title: `${title}${title && " | "}Astro Ship`,
image: resolvedImageWithDomain,
},
}}
/>
</head>
<body>
<Navbar />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/contact.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Button from "@components/ui/button.astro";
import Contactform from "@components/contactform.astro";
---

<Layout title="About">
<Layout title="Contact">
<Container>
<Sectionhead>
<Fragment slot="title">Contact</Fragment>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/pricing.astro
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const pricing = [
];
---

<Layout title="About">
<Layout title="Pricing">
<Container>
<Sectionhead>
<Fragment slot="title">Pricing</Fragment>
Expand Down

0 comments on commit 4e0e135

Please sign in to comment.