Skip to content

Commit 430dafd

Browse files
committed
페이지 타이틀 번역하도록 수정
1 parent 8c0da3b commit 430dafd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/Providers/MetaTagsServiceProvider.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ protected function checkTranslationKey(string $key): void
5454
protected function registerMeta(): void
5555
{
5656
$this->app->singleton(MetaInterface::class, function () {
57+
// 번역 키 확인
58+
$this->checkTranslationKey('seo.title');
59+
$this->checkTranslationKey('seo.description');
60+
$this->checkTranslationKey('seo.keywords');
61+
62+
Config::set('meta_tags.title.default', __('seo.title'));
63+
5764
$meta = new Meta(
5865
$this->app[ManagerInterface::class],
5966
$this->app['config']
@@ -64,11 +71,6 @@ protected function registerMeta(): void
6471
$ogConfig = $metaConfig['og'] ?? [];
6572
$imagesConfig = $metaConfig['images'] ?? [];
6673

67-
// 번역 키 확인
68-
$this->checkTranslationKey('seo.title');
69-
$this->checkTranslationKey('seo.description');
70-
$this->checkTranslationKey('seo.keywords');
71-
7274
// 기본 태그 설정
7375
$meta->setTitle(__('seo.title'));
7476
$meta->addTag('variables', new JavascriptVariables([

0 commit comments

Comments
 (0)