Skip to content

Commit 8873cc3

Browse files
authored
Merge pull request #1522 from zhaiqianfeng/master
Add `Subtitle` option to home index.
2 parents e326306 + d2a65f6 commit 8873cc3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

_config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ authoricon: heart
2222
# Footer `powered-by` and `theme-info` copyright
2323
copyright: true
2424

25+
# ---------------------------------------------------------------
26+
# SEO Settings
27+
# ---------------------------------------------------------------
2528

2629
# Canonical, set a canonical link tag in your hexo, you could use it for your SEO of blog.
2730
# See: https://support.google.com/webmasters/answer/139066
@@ -31,6 +34,10 @@ canonical: true
3134
# Change headers hierarchy on site-subtitle (will be main site description) and on all post/pages titles for better SEO-optimization.
3235
seo: false
3336

37+
# If true, will add site-subtitle to index page, added in main hexo config.
38+
# subtitle: Subtitile
39+
index_with_subtitle: false
40+
3441
# ---------------------------------------------------------------
3542
# Menu Settings
3643
# ---------------------------------------------------------------

layout/index.swig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% import '_macro/post.swig' as post_template %}
33
{% import '_macro/sidebar.swig' as sidebar_template %}
44

5-
{% block title %} {{ config.title }} {% endblock %}
5+
{% block title %}{{ config.title }}{% if theme.index_with_subtitle and config.subtitle %} - {{config.subtitle }}{% endif %}{% endblock %}
66

77
{% block page_class %}
88
{% if is_home() %} page-home {% endif %}

0 commit comments

Comments
 (0)