feat: SEO altyapısı — pre-render, meta tags, blog posts, robots/sitemap
- vite-plugin-prerender yerine Playwright tabanlı post-build pre-render scripti (apps/web/scripts/prerender.mjs): 10 public route statik HTML'e dönüştürülüyor - usePageMeta hook: her public route'da özgün title/description/canonical/OG tags - index.html: favicon.svg, canonical, OG/Twitter Card, geliştirilmiş title+desc - apps/web/public/: robots.txt, sitemap.xml (10 URL), favicon.svg - nginx HSTS header eklendi (Strict-Transport-Security) - Blog post sayfaları: blog_/$slug.tsx (4 tam yazı, 600-800 kelime) - blog.tsx: post kartlarına Link eklendi - Homepage: Schema.org JSON-LD (Organization + SoftwareApplication) - Footer: placeholder href="#" sosyal linkler kaldırıldı - deploy.sh + deploy.yml: playwright install chromium + prerender adımı Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -392,6 +392,7 @@ export class CategoriesService {
|
||||
id: category.id,
|
||||
name: category.name,
|
||||
description: category.nameOriginal || null,
|
||||
parentId: category.parentId || null,
|
||||
parts: [],
|
||||
schemaPics: [],
|
||||
hotspots: [],
|
||||
@@ -533,7 +534,16 @@ export class CategoriesService {
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
this.logger.error(`Failed to fetch PartsCatalogs parts for category ${categoryId}: ${(err as Error).message}`);
|
||||
const msg = (err as Error).message;
|
||||
this.logger.error(`Failed to fetch PartsCatalogs parts for category ${categoryId}: ${msg}`);
|
||||
// HTTP 400 = upstream API has no parts for this group; mark unavailable to prevent infinite retries
|
||||
if (msg.includes("HTTP 400")) {
|
||||
await this.db
|
||||
.update(categories)
|
||||
.set({ unavailable: true })
|
||||
.where(eq(categories.id, categoryId));
|
||||
this.logger.warn(`Marked category ${categoryId} as unavailable (empty group from PartsCatalogs)`);
|
||||
}
|
||||
}
|
||||
} else if (vehicle && category.source === "emex") {
|
||||
// EMEX: fetch parts + schema image via Puppeteer from QuickDetails URL
|
||||
@@ -736,6 +746,7 @@ export class CategoriesService {
|
||||
id: category.id,
|
||||
name: category.name,
|
||||
description: category.nameOriginal || null,
|
||||
parentId: category.parentId || null,
|
||||
parts: dbParts,
|
||||
schemaPics: mappedPics,
|
||||
hotspots: mappedHotspots,
|
||||
|
||||
Reference in New Issue
Block a user