mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 18:51:08 +08:00
Link to category slug instead of name in onebox
This commit is contained in:
@ -64,7 +64,7 @@ module Oneboxer
|
|||||||
|
|
||||||
category = topic.category
|
category = topic.category
|
||||||
if category
|
if category
|
||||||
category = "<a href=\"/category/#{category.name}\" class=\"badge badge-category\" style=\"background-color: ##{category.color}\">#{category.name}</a>"
|
category = "<a href=\"/category/#{category.slug}\" class=\"badge badge-category\" style=\"background-color: ##{category.color}\">#{category.name}</a>"
|
||||||
end
|
end
|
||||||
|
|
||||||
quote = post.excerpt(SiteSetting.post_onebox_maxlength)
|
quote = post.excerpt(SiteSetting.post_onebox_maxlength)
|
||||||
|
Reference in New Issue
Block a user