Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大白技术控
yanglr2010
提交
57ef4c31
Y
yanglr2010
项目概览
大白技术控
/
yanglr2010
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yanglr2010
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
57ef4c31
编写于
9月 16, 2019
作者:
EvanOne(文一)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: Solved the problem that the same title in different pages
上级
891b1b72
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
26 addition
and
17 deletion
+26
-17
layout/_layout.pug
layout/_layout.pug
+1
-1
layout/_partials/head/head.pug
layout/_partials/head/head.pug
+25
-16
未找到文件。
layout/_layout.pug
浏览文件 @
57ef4c31
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
doctype html
doctype html
html(lang=config.language)
html(lang=config.language)
head
head
!= partial('./_partials/head/head.pug', null, { cache: theme.cache })
include ./_partials/head/head.pug
body
body
div#container.container
div#container.container
header#header.header
header#header.header
...
...
layout/_partials/head/head.pug
浏览文件 @
57ef4c31
-
-
var title = __('title') !== 'title' ? __('title') : config.title
var title = __('title') !== 'title' ? __('title') : config.title
;
var subtitle = __('subtitle') !== 'subtitle' ? __('subtitle') : config.subtitle
var subtitle = __('subtitle') !== 'subtitle' ? __('subtitle') : config.subtitle
;
var author = __('author') !== 'author' ? __('author') : config.author
var author = __('author') !== 'author' ? __('author') : config.author
;
var description = __('description') !== 'description' ? __('description') : config.description
var description = __('description') !== 'description' ? __('description') : config.description
;
var keywords = config.author + ', ' + config.title
var keywords = config.author + ', ' + config.title
;
var title_suffix = ' | ' + title
var title_suffix = ' | ' + title
;
if (is_home()) title = title + (theme.index_subtitle ? ' | ' + subtitle : '')
if (is_home()) {
else if (is_archive()) title = __('title.archive') + title_suffix
title = title + ((theme.index_subtitle && subtitle) ? (' | ' + subtitle) : '');
else if (is_category()) title = __('title.category') + ': ' + page.category + title_suffix
} else if (is_archive()) {
else if (is_tag()) title = __('title.tag') + ': ' + page.tag + title_suffix
title = __('title.archive') + title_suffix;
else if (is_post()) title = page.title + title_suffix
} else if (is_category()) {
else if (is_page())
title = __('title.category') + ': ' + page.category + title_suffix;
if (page.type === 'tags') title = __('title.tag') + title_suffix
} else if (is_tag()) {
else if (page.type === 'categories') title = __('title.category') + title_suffix
title = __('title.tag') + ': ' + page.tag + title_suffix;
else title = page.title + title_suffix
} else if (is_post()) {
else title = page.title + title_suffix
title = page.title + title_suffix;
} else {
if (page.type === 'tags') {
title = __('title.tag') + title_suffix;
} else if (page.type === 'categories') {
title = __('title.category') + title_suffix;
} else {
title = page.title + title_suffix;
}
}
meta(charset="UTF-8")
meta(charset="UTF-8")
meta(http-equiv="X-UA-Compatible" content="IE=edge")
meta(http-equiv="X-UA-Compatible" content="IE=edge")
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录