Skip to content

Commit 75793bb

Browse files
feat : [SEO] -Adding OG Image for Link Preview
1 parent 4c691b8 commit 75793bb

File tree

7 files changed

+11
-35
lines changed

7 files changed

+11
-35
lines changed

client/composables/useSeoSchema.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ export const useSeoSchema = () => {
33
const siteUrl = config.public.site.url
44

55
const generateOrganizationSchema = () => {
6-
if (!siteUrl) {
7-
console.warn('NUXT_PUBLIC_SITE_URL is not set, skipping organization schema')
8-
return null
9-
}
10-
116
return {
127
"@context": "https://schema.org",
138
"@type": "Organization",

client/composables/useTheme.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ export const useTheme = () => {
1818
isDark.value = savedTheme === 'dark'
1919
} else {
2020
// Check system preference if no saved theme
21-
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
22-
isDark.value = prefersDark
21+
// const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
22+
// isDark.value = prefersDark
23+
24+
isDark.value = false
2325
}
2426
updateTheme()
2527
}

client/nuxt.config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default defineNuxtConfig({
3535
content:
3636
"Monitor and compare AI trading models in real-time. Track crypto portfolio performance, positions, and trading analytics.",
3737
},
38-
{ property: "og:image", content: "/logo.png" },
38+
{ property: "og:image", content: "/og-image.jpg" },
3939
{ property: "og:image:width", content: "1200" },
4040
{ property: "og:image:height", content: "630" },
4141
{ property: "og:site_name", content: "BitNerve" },
@@ -49,7 +49,7 @@ export default defineNuxtConfig({
4949
content:
5050
"Monitor and compare AI trading models. Track performance, positions, and analytics across multiple AI trading agents.",
5151
},
52-
{ name: "twitter:image", content: "/logo.png" },
52+
{ name: "twitter:image", content: "/og-image.jpg" },
5353

5454
// Additional SEO Meta Tags
5555
{ name: "apple-mobile-web-app-capable", content: "yes" },
@@ -121,7 +121,7 @@ export default defineNuxtConfig({
121121
name: "BitNerve",
122122
description:
123123
"Real-time monitoring and comparison of AI trading models with cryptocurrency portfolio analytics",
124-
url: process.env.NUXT_PUBLIC_SITE_URL || "",
124+
url: "https://bitnerve.arjunkrishna.dev",
125125
applicationCategory: "FinanceApplication",
126126
offers: {
127127
"@type": "Offer",
@@ -167,7 +167,7 @@ export default defineNuxtConfig({
167167
modules: ["radix-vue/nuxt"],
168168

169169
site: {
170-
url: process.env.NUXT_PUBLIC_SITE_URL,
170+
url: "https://bitnerve.arjunkrishna.dev",
171171
name: "BitNerve",
172172
},
173173

@@ -199,7 +199,7 @@ export default defineNuxtConfig({
199199

200200
public: {
201201
site: {
202-
url: process.env.NUXT_PUBLIC_SITE_URL,
202+
url: "https://bitnerve.arjunkrishna.dev",
203203
name: "BitNerve",
204204
},
205205
},

client/plugins/seo.client.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@ export default defineNuxtPlugin(() => {
22
const config = useRuntimeConfig()
33
const siteUrl = config.public.site.url
44

5-
if (!siteUrl) {
6-
console.warn('NUXT_PUBLIC_SITE_URL is not set')
7-
return
8-
}
9-
105
useHead({
116
meta: [
127
{ property: 'og:url', content: siteUrl },
13-
{ property: 'og:image', content: `${siteUrl}/og-image.png` },
8+
{ property: 'og:image', content: `${siteUrl}/og-image.jpg` },
149
{ name: 'twitter:url', content: siteUrl },
15-
{ name: 'twitter:image', content: `${siteUrl}/twitter-image.png` },
10+
{ name: 'twitter:image', content: `${siteUrl}/og-image.jpg` },
1611
],
1712
link: [
1813
{ rel: 'canonical', href: siteUrl },

client/public/og-image.jpg

108 KB
Loading

client/server/routes/robots.txt.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ import { defineEventHandler, setHeader } from "h3"
33
export default defineEventHandler(async (event) => {
44
const config = useRuntimeConfig()
55
const siteUrl = config.public.site.url
6-
7-
if (!siteUrl) {
8-
throw createError({
9-
statusCode: 500,
10-
message: "NUXT_PUBLIC_SITE_URL is not configured",
11-
})
12-
}
13-
146
const robots = `User-agent: *
157
Allow: /
168
Disallow: /api/

client/server/routes/sitemap.xml.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ import { defineEventHandler, setHeader } from "h3"
33
export default defineEventHandler(async (event) => {
44
const config = useRuntimeConfig()
55
const siteUrl = config.public.site.url
6-
7-
if (!siteUrl) {
8-
throw createError({
9-
statusCode: 500,
10-
message: "NUXT_PUBLIC_SITE_URL is not configured",
11-
})
12-
}
13-
146
const pages = [
157
{
168
loc: "/",

0 commit comments

Comments
 (0)