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

Fixes titles excess spaces on posts and pages. #1609

Merged
merged 7 commits into from
Apr 21, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
FIX: page excess spaces.
Note: i understand what afterthat fix block code is hard for edit, but spaces in Titles is no good for seo and they not may minified like other scripts, etc.
ivan-nginx authored Apr 20, 2017
commit ad15305b1952572b836f16dde7c60b92746de6c0
12 changes: 1 addition & 11 deletions layout/page.swig
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
{% extends '_layout.swig' %}
{% import '_macro/sidebar.swig' as sidebar_template %}

{% block title %}
{% set page_title_suffix = ' | ' + config.title %}

{% if page.type === "categories" and not page.title %}
{{ __('title.category') + page_title_suffix }}
{% elif page.type === "tags" and not page.title %}
{{ __('title.tag') + page_title_suffix }}
{% else %}
{{ page.title + page_title_suffix }}
{% endif %}
{% endblock %}
{% block title %}{% set page_title_suffix = ' | ' + config.title %}{% if page.type === "categories" and not page.title %}{{ __('title.category') + page_title_suffix }}{% elif page.type === "tags" and not page.title %}{{ __('title.tag') + page_title_suffix }}{% else %}{{ page.title + page_title_suffix }}{% endif %}{% endblock %}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is hard for human to read.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But easy to read for search engines. For them it's will /n/r &nbsp in Titles. It's very bad.
I wrote about it in subcomment.


{% block content %}