SEO & fixes

This commit is contained in:
Surjith S M
2022-11-09 15:58:36 +05:30
parent f4f0e2b66a
commit 4e0e1350a2
6 changed files with 27 additions and 5 deletions

View File

@@ -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": {

6
pnpm-lock.yaml generated
View File

@@ -12,6 +12,7 @@ specifiers:
astro: ^1.6.0
astro-feather-icons: ^1.0.2
astro-icon: ^0.8.0
astro-seo: ^0.6.0
tailwindcss: ^3.0.24
dependencies:
@@ -25,6 +26,7 @@ dependencies:
astro: 1.6.2
astro-feather-icons: 1.0.2
astro-icon: 0.8.0
astro-seo: 0.6.0
tailwindcss: 3.2.1
devDependencies:
@@ -897,6 +899,10 @@ packages:
svgo: 2.8.0
dev: false
/astro-seo/0.6.0:
resolution: {integrity: sha512-nR+dJlAyQhX6s0oAmbBqPq3KCZax/zVAerFsclGiJQ2znOkS/7L+RGjziS4M9Q3OQxm3FMfqIKHp9Ns73Q81ww==}
dev: false
/astro/1.6.2:
resolution: {integrity: sha512-UHbzQ3Q7iU2a0XBY6Dzh/Hksoa7svmkWZ3ABRGgSOT765GXIGZkErgeNAsjsBW7RsTUKVLqVxD2LK3NzZL5EKA==}
engines: {node: ^14.18.0 || >=16.12.0, npm: '>=6.14.0'}

BIN
public/opengraph.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -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";
@@ -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;
---
@@ -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 />

View File

@@ -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>

View File

@@ -64,7 +64,7 @@ const pricing = [
];
---
<Layout title="About">
<Layout title="Pricing">
<Container>
<Sectionhead>
<Fragment slot="title">Pricing</Fragment>