mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -1672,6 +1672,9 @@ en:
|
||||
default: "(default)"
|
||||
any: "any"
|
||||
|
||||
homepage:
|
||||
default: "(default)"
|
||||
|
||||
password_confirmation:
|
||||
title: "Password Again"
|
||||
|
||||
@@ -4183,6 +4186,9 @@ en:
|
||||
this_week: "Week"
|
||||
today: "Today"
|
||||
|
||||
custom_homepage:
|
||||
admin_message: 'One of your themes has enabled the "custom_homepage" modifier but it does not output anything in the [custom-homepage] connector. (This message is only shown to site administrators.)'
|
||||
|
||||
browser_update: 'Unfortunately, <a href="https://www.discourse.org/faq/#browser">your browser is unsupported</a>. Please <a href="https://browsehappy.com">switch to a supported browser</a> to view rich content, log in and reply.'
|
||||
|
||||
permission_types:
|
||||
|
||||
@@ -1586,6 +1586,8 @@ Discourse::Application.routes.draw do
|
||||
constraints: HomePageConstraint.new("finish_installation"),
|
||||
as: "installation_redirect"
|
||||
|
||||
root to: "custom#index", constraints: HomePageConstraint.new("custom"), as: "custom_index"
|
||||
|
||||
get "/user-api-key/new" => "user_api_keys#new"
|
||||
post "/user-api-key" => "user_api_keys#create"
|
||||
post "/user-api-key/revoke" => "user_api_keys#revoke"
|
||||
|
||||
Reference in New Issue
Block a user