fix meta and schema issues

pull/3/head
Subhodip Ghosh 2025-06-10 17:44:27 +05:30
parent 17112816cb
commit b82a834e2b
6 changed files with 69 additions and 47 deletions

View File

@ -1,5 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1749458793986
"lastUpdateCheck": 1749549186203
}
}

1
.astro/types.d.ts vendored
View File

@ -1 +1,2 @@
/// <reference types="astro/client" />
/// <reference path="content.d.ts" />

View File

@ -8,7 +8,8 @@
"start": "astro dev --preview --port 3000",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
"astro": "astro",
"push-prod": "rsync -rv dist/ u2@157.180.25.14:~/web/tst2.teachertrainingkolkata.in/public_html/"
},
"dependencies": {
"@astrojs/react": "^4.2.1",

View File

@ -12,6 +12,7 @@ export interface Props {
}
const { title, description, keywords, ogImage, ogUrl, canonicalUrl, newSchema1, newSchema2, newSchema3 } = Astro.props;
console.log('Astro.props', newSchema1, newSchema2, newSchema3)
---
<!DOCTYPE html>
@ -19,7 +20,7 @@ const { title, description, keywords, ogImage, ogUrl, canonicalUrl, newSchema1,
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-M4948JYT6C"></script>
<script>
<script is:inline>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
@ -42,29 +43,19 @@ const { title, description, keywords, ogImage, ogUrl, canonicalUrl, newSchema1,
<meta property="og:image" content={ogImage}>
<meta property="og:url" content={ogUrl}>
<meta property="og:type" content="website">
{newSchema1 && (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: newSchema1,
}}
/>
)}
{newSchema2 && (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: newSchema2,
}}
/>
)}{newSchema3 && (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: newSchema3,
}}
/>
)}
<script is:inline type="application/ld+json" set:html={newSchema1}/>
<script is:inline type="application/ld+json" set:html={newSchema2}/>
<script is:inline type="application/ld+json" set:html={newSchema3}/>
<!-- {newSchema1 && (
<script is:inline type="application/ld+json" set:html={newSchema1}/>
)}
{newSchema2 && (
// <script type="application/ld+json" dangerouslySetInnerHTML={{__html: newSchema2, }}/>
<script is:inline type="application/ld+json" set:html={newSchema2}/>
)}
{newSchema3 && (
<script is:inline type="application/ld+json" set:html={newSchema3}/>
)} -->
</head>
<body>
<slot />

View File

@ -35,17 +35,22 @@ export async function getStaticPaths() {
return [];
}
}
{console.log('blogData000',blogData, `https://akadmyapp.com/blogs/${id}`)}
// console.log('blogData000', blogData, `https://akadmyapp.com/blogs/${id}`)
// const schema1 = blogData.schema1.replaceAll("\n", "");
const schema1 = blogData?.schema?.replaceAll("\n", "");
const schema2 = blogData?.schema2?.replaceAll("\n", "");
const schema3 = blogData?.schema3?.replaceAll("\n", "");
---
<Layout
title={blogData?.title ?? 'Blog | Akademy'}
description={blogData?.meta_description}
canonicalUrl={`https://akadmyapp.com/blogs/${id}`}
ogImage={`https://management.beanstalkedu.com/assets/${blogData?.og_img}`}
ogUrl={'https://akadmyapp.com'}
newSchema1={blogData?.schema1?.replaceAll("\n", "")}
newSchema2={blogData?.schema2?.replaceAll("\n", "")}
newSchema3={blogData?.schema3?.replaceAll("\n", "")}>
title={blogData?.title ?? 'Blog | Akademy'}
description={blogData.meta_description}
canonicalUrl={`https://akadmyapp.com/blogs/${id}`}
ogImage={`https://management.beanstalkedu.com/assets/${blogData?.og_img}`}
ogUrl={'https://akadmyapp.com'}
newSchema1={schema1}
newSchema2={schema2}
newSchema3={schema3}>
<SingleBlog client:only="react" blog={blogData} />
</Layout>

View File

@ -991,15 +991,15 @@
resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz"
integrity sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==
"@esbuild/win32-x64@0.21.5":
"@esbuild/linux-x64@0.21.5":
version "0.21.5"
resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz"
integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==
resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz"
integrity sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==
"@esbuild/win32-x64@0.25.5":
"@esbuild/linux-x64@0.25.5":
version "0.25.5"
resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz"
integrity sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==
resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz"
integrity sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==
"@eslint-community/eslint-utils@^4.2.0":
version "4.7.0"
@ -1052,10 +1052,29 @@
resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz"
integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==
"@img/sharp-win32-x64@0.33.5":
"@img/sharp-libvips-linux-x64@1.0.4":
version "1.0.4"
resolved "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz"
integrity sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==
"@img/sharp-libvips-linuxmusl-x64@1.0.4":
version "1.0.4"
resolved "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz"
integrity sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==
"@img/sharp-linux-x64@0.33.5":
version "0.33.5"
resolved "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz"
integrity sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==
resolved "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz"
integrity sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==
optionalDependencies:
"@img/sharp-libvips-linux-x64" "1.0.4"
"@img/sharp-linuxmusl-x64@0.33.5":
version "0.33.5"
resolved "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz"
integrity sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==
optionalDependencies:
"@img/sharp-libvips-linuxmusl-x64" "1.0.4"
"@isaacs/cliui@^8.0.2":
version "8.0.2"
@ -1507,10 +1526,15 @@
estree-walker "^2.0.2"
picomatch "^4.0.2"
"@rollup/rollup-win32-x64-msvc@4.42.0":
"@rollup/rollup-linux-x64-gnu@4.42.0":
version "4.42.0"
resolved "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.42.0.tgz"
integrity sha512-LpHiJRwkaVz/LqjHjK8LCi8osq7elmpwujwbXKNW88bM8eeGxavJIKKjkjpMHAh/2xfnrt1ZSnhTv41WYUHYmA==
resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.42.0.tgz"
integrity sha512-Gfm6cV6mj3hCUY8TqWa63DB8Mx3NADoFwiJrMpoZ1uESbK8FQV3LXkhfry+8bOniq9pqY1OdsjFWNsSbfjPugw==
"@rollup/rollup-linux-x64-musl@4.42.0":
version "4.42.0"
resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.42.0.tgz"
integrity sha512-g86PF8YZ9GRqkdi0VoGlcDUb4rYtQKyTD1IVtxxN4Hpe7YqLBShA7oHMKU6oKTCi3uxwW4VkIGnOaH/El8de3w==
"@shikijs/core@3.6.0":
version "3.6.0"