Skip to content

如图两个位置怎么修改成不同的标题呢 #1220

Answered by nixgnauhcuy
zippedalo asked this question in Q&A
Discussion options

You must be logged in to vote

左上角标题在 themes\butterfly\layout\includes\header\nav.pug 获取了 _config.yml 文件中的 title

a#site-name(href=url_for('/')) #[=config.title]

中间的标题在 themes\butterfly\layout\includes\header\index.pug 获取了 _config.yml 文件中的 title

- var site_title = page.title || page.tag || page.category || config.title

可以在这两个定制一下你想要的效果。
例如,你想修改左上角标题为 ZippedAlo‘s blog,你可以在 _config.yml 中增加一个 title_blog

title: ZippedAlo
title_blog: ZippedAlo's blog

并修改 themes\butterfly\layout\includes\header\nav.pug

a#site-name(href=url_for('/')) #[=config.title_blog]

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zippedalo
Comment options

Answer selected by zippedalo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants