improve seo tagging, update nginx config file

This commit is contained in:
r888888888
2016-05-23 17:05:23 -07:00
parent a90750f5e1
commit ba65ec3e18
3 changed files with 9 additions and 2 deletions

View File

@@ -121,7 +121,7 @@ class Post < ActiveRecord::Base
end
def seo_tags
@seo_tags ||= humanized_essential_tag_string.gsub(/[^a-z0-9]+/, "-").gsub(/(^-+)|(-+$)/, "")
@seo_tags ||= humanized_essential_tag_string.gsub(/[^a-z0-9]+/, "-").gsub(/(?:^-+)|(?:-+$)/, "").gsub(/-{2,}/, "-")
end
def preview_file_url