mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 01:54:12 +08:00
1eb70973a2
This PR adds a theme modifier and route so that custom themes can opt to show their own homepage. See PR description for example usage.
10 lines
271 B
Ruby
10 lines
271 B
Ruby
# frozen_string_literal: true
|
|
|
|
class HomepageHelper
|
|
def self.resolve(request = nil, current_user = nil)
|
|
return "custom" if ThemeModifierHelper.new(request: request).custom_homepage
|
|
|
|
current_user ? SiteSetting.homepage : SiteSetting.anonymous_homepage
|
|
end
|
|
end
|