fix(seo): 봇 SEO HTML의 코어 app.css 404 참조 제거 (, )
SeoRenderer.getCssPath가 구 Vite manifest 구조만 파싱해 존재하지 않는 고정 경로 /build/assets/app.css 를 반환, 봇 렌더링 HTML(seo.blade)에서 CSS 404가 발생했다. 해당 파일은 실제 사용자 화면에서 미참조하는 Laravel 기본 빌드 산출물이므로, 담당자 답변 방향대로 참조 자체와 getCssPath 메서드를 제거했다. 봇 스타일은 템플릿 CSS($stylesheets)가 그대로 담당한다.
This commit is contained in:
1 parent
c0e0d82459
commit
7598b76498
8 files changed
+95
-52
No files matched your search
@@ -464,7 +464,6 @@ class SeoRenderer implements SeoRendererInterface
|
||||
'googleAnalyticsId' => $meta['googleAnalyticsId'],
|
||||
'googleVerification' => $meta['googleVerification'],
|
||||
'naverVerification' => $meta['naverVerification'],
|
||||
'cssPath' => $this->getCssPath(),
|
||||
'stylesheets' => $allStylesheets,
|
||||
'extraHeadTags' => '',
|
||||
'extraBodyEnd' => '',
|
||||
@@ -732,28 +731,6 @@ class SeoRenderer implements SeoRendererInterface
|
||||
return $tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Vite 빌드 CSS 경로를 반환합니다.
|
||||
*
|
||||
* @return string CSS 경로
|
||||
*/
|
||||
private function getCssPath(): string
|
||||
{
|
||||
$manifestPath = public_path('build/manifest.json');
|
||||
if (file_exists($manifestPath)) {
|
||||
$manifest = json_decode(file_get_contents($manifestPath), true);
|
||||
foreach ($manifest as $entry) {
|
||||
if (isset($entry['css'])) {
|
||||
foreach ($entry['css'] as $css) {
|
||||
return '/build/'.$css;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return '/build/assets/app.css';
|
||||
}
|
||||
|
||||
/**
|
||||
* SEO 렌더링용 _global 컨텍스트를 구성합니다.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user