Closed zamakkat closed 8 years ago
Oh an for those looking for a fix, you just need to add an initializer. Create a file config/initializers/meta_tags.rb
with this content:
MetaTags.configure do |config|
# How many characters to truncate title to.
config.title_limit = 70
# How many characters to truncate description to.
config.description_limit = 160
# How many characters to truncate keywords to.
config.keywords_limit = 255
# Keywords separator - a string to join keywords with.
config.keywords_separator = ', '
end
Change the title_limit
accordingly to what you need :)
Considering closed :-)
The changes introduced in release 2.1.0 made some breaking changes when enforcing the whole site title to be no more than 70 characters. For example if I had a page title
Privacy Policy
and a site titleWebsite Name - The very best website name in the whole Universe
I would expect to get this:Privacy Policy | Website Name - The very best website name in the whole Universe
but instead I get something like this:
Priv | Website Name - The very best website name in the whole Universe
After a while of looking around I realized it was a "feature". Ref: https://github.com/kpumuk/meta-tags/commit/1c4ed2157e4a869dc57ed521fbe562522c872ecf. Although I understand that this is SEO "best practices", I think it makes a lot of sense to make it optional or at least warn with a depreciation message on upgrade. And maybe just truncate from the end instead of truncating the page title?