Skip to content

Commit

Permalink
fix: Display the preset i18n infomation when the post has no title
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed Dec 10, 2019
1 parent ac196da commit 22a425f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ post:
read_more: Read more
fire: Heat
sticky: Sticky top
untitled: ( Untitled )
untitled: "[ Untitled ]"
end: End of text, thank you for reading
copyright:
author: Author
Expand Down
2 changes: 1 addition & 1 deletion languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ post:
read_more: 阅读全文
fire: 热度
sticky: 置顶文章
untitled: ( 文章无标题 )
untitled: "[ 文章无标题 ]"
end: 本文结束,感谢您的阅读
copyright:
author: 本文作者
Expand Down
2 changes: 1 addition & 1 deletion layout/_partials/head/head.pug
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
} else if (is_tag()) {
title = __('title.tag') + ': ' + page.tag + title_suffix;
} else if (is_post()) {
title = page.title + title_suffix;
title = page.title || __('post.untitled') + title_suffix;
} else {
if (page.type === 'tags') {
title = __('title.tag') + title_suffix;
Expand Down

0 comments on commit 22a425f

Please sign in to comment.