DEV: allow themes to render their own custom homepage (#26291)

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.
This commit is contained in:
Penar Musaraj
2024-04-02 11:05:08 -04:00
committed by GitHub
parent 7eec13375d
commit 1eb70973a2
22 changed files with 271 additions and 9 deletions

View File

@ -559,7 +559,7 @@ module ApplicationHelper
end
def current_homepage
current_user&.user_option&.homepage || SiteSetting.anonymous_homepage
current_user&.user_option&.homepage || HomepageHelper.resolve(request, current_user)
end
def build_plugin_html(name)
@ -758,6 +758,10 @@ module ApplicationHelper
user&.display_name
end
def anonymous_top_menu_items
Discourse.anonymous_top_menu_items.map(&:to_s)
end
def authentication_data
return @authentication_data if defined?(@authentication_data)