feat(metadata): enhance SEO by adding Open Graph and Twitter metadata across various pages
feat(blog): implement loading and error handling components for blog pages feat(clinic): add loading and error handling components for clinic pages feat(doctor): create loading and error handling components for doctor pages feat(clinics): add loading component for clinics page feat(specialties): improve metadata for specialties page with Open Graph and Twitter images feat(layout): add structured data for Organization and WebSite in layout fix(middleware): restrict middleware execution to specific routes to improve performance chore(audit): add comprehensive SEO and performance audit documentation
This commit is contained in:
+31
-1
@@ -66,8 +66,30 @@ export async function generateMetadata() {
|
||||
return baseMetadata;
|
||||
}
|
||||
|
||||
export default function RootLayout({ children }) {
|
||||
export default async function RootLayout({ children }) {
|
||||
const { matchedCity } = await getStateInfo();
|
||||
const siteName = matchedCity?.site_name || "نوبت 724";
|
||||
const siteUrl = "https://www.nobat724.com";
|
||||
|
||||
const organizationJsonLd = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Organization",
|
||||
name: siteName,
|
||||
url: siteUrl,
|
||||
logo: `${siteUrl}/assets/images/logo.png`,
|
||||
};
|
||||
|
||||
const websiteJsonLd = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
url: siteUrl,
|
||||
name: siteName,
|
||||
potentialAction: {
|
||||
"@type": "SearchAction",
|
||||
target: `${siteUrl}/doctors?search={search_term_string}`,
|
||||
"query-input": "required name=search_term_string",
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
<html lang="fa" dir="rtl" suppressHydrationWarning>
|
||||
@@ -76,6 +98,14 @@ export default function RootLayout({ children }) {
|
||||
name="viewport"
|
||||
content="width=device-width,initial-scale=1"
|
||||
/>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(organizationJsonLd) }}
|
||||
/>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(websiteJsonLd) }}
|
||||
/>
|
||||
</head>
|
||||
<ThemeRegistry>
|
||||
{process.env.DEV_MODE === 'FALSE' && (
|
||||
|
||||
Reference in New Issue
Block a user