Skip to content

Commit

Permalink
Merge pull request #75 from anketwokings/master
Browse files Browse the repository at this point in the history
Limit description again to 158 chars, google seems to have changed it…
  • Loading branch information
bobdenotter committed Sep 20, 2019
2 parents 56bc088 + a2c16f1 commit 2a9823a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title_postfix: ''
# will _not_ make them appear as longer snippets in Google.
# Set a value (i.e. 255) for the `keywords_length`, to enable the meta keywords option.
title_length: 70
description_length: 350
description_length: 158
keywords_length: 0 #255

# Default values to consider for the title, meta description and meta keywords
Expand Down
6 changes: 3 additions & 3 deletions templates/_seo_extension_field.twig
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

{% set seovalues = context.content.get(contentkey)|default('')|json_decode|default([]) %}
{% set title_length = seoconfig.title_length|default(70) %}
{% set description_length = seoconfig.description_length|default(350) %}
{% set description_length = seoconfig.description_length|default(158) %}
{% set keywords_length = seoconfig.keywords_length|default(0) %}

{% if seovalues.robots is not defined %}
Expand All @@ -63,7 +63,7 @@
</fieldset>

<div class="postfix" style="margin-top: 8px;">
<p>{{__("Will be used as the <tt>&lt;title&gt;</tt> and in search engines")}}.
<p>{{__("Will be used as the <tt>&lt;title&gt;</tt> and in search engines")}}.
{{__("Limit the length to %s characters", {'%s': title_length}) }}.</p>
</div>

Expand Down Expand Up @@ -205,7 +205,7 @@
$('#seosnippet .title').text( this.trimtext(title, {{ title_length }}) );
$('#seosnippet cite').text( this.hostname + link );
$('#seosnippet .excerpt').text( this.trimtext(description, {{ description_length }}) );
$('#seosnippet .excerpt').text( this.trimtext(description, {{ description_length }}) );
var value = {
'title': $('#seofields-title').val(),
Expand Down

0 comments on commit 2a9823a

Please sign in to comment.