Skip to content

add subtitle to home index#1522

Merged
ivan-nginx merged 4 commits intoiissnan:masterfrom
zhaiqianfeng:master
Apr 20, 2017
Merged

add subtitle to home index#1522
ivan-nginx merged 4 commits intoiissnan:masterfrom
zhaiqianfeng:master

Conversation

@zhaiqianfeng
Copy link
Copy Markdown
Contributor

add subtitle to home index

@ivan-nginx
Copy link
Copy Markdown
Collaborator

@zhaiqianfeng need add config switch for this option.

@zhaiqianfeng
Copy link
Copy Markdown
Contributor Author

@ivan-nginx ok. I have improved.

@ivan-nginx
Copy link
Copy Markdown
Collaborator

ivan-nginx commented Apr 20, 2017

@zhaiqianfeng ok. there is some errors in your code.

If we open src, we will see:

  <title> 
   Hexo Test 
   
     - Subtitile 
   
</title>

And this is wrong and bad for seo.

But this code will be nice, without excess spaces:

{% block title %}{{ config.title }}{% if theme.index_withsubtitle and config.subtitle %} - {{config.subtitle }}{% endif %}{% endblock %}

image


P.S. REM: also, need to fix all extra spaces on other subpages.
image

@zhaiqianfeng
Copy link
Copy Markdown
Contributor Author

Thank you @ivan-nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants