Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add subtitle to home index #1522

Merged
merged 4 commits into from
Apr 20, 2017
Merged

add subtitle to home index #1522

merged 4 commits into from
Apr 20, 2017

Conversation

zhaiqianfeng
Copy link
Contributor

add subtitle to home index

@ivan-nginx
Copy link
Collaborator

@zhaiqianfeng need add config switch for this option.

@zhaiqianfeng
Copy link
Contributor Author

@ivan-nginx ok. I have improved.

@ivan-nginx
Copy link
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
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