This PR allows an organizer to select which page will serve as the landing page for the website. The thought is that when an event is first announced there will likely be a different page to serve as the landing page than when registration starts and the conference begins.
Moreover, this PR hopefully improves some of the routing complexity needed in order to host multiple websites using custom domains without also getting tangled in the home page for CFP app itself. One challenge the PR hopefully addresses is a possible conflict between routes like railsconf.org/about which should route to the latest Railsconf about page and railsconf.org/railsconf-2021 which should route to the landing page for an older Railsconf site. Since these two urls have similar signatures the route param was renamed to :domain_page_or_slug for clarity.
Changes
adds Page#landing to track the landing page for website
adds Page.promote for changing the landing page of a website
improves routing to prevent conflicts with cfp_app home page with the
landing pages of domain requested event websites
refines domain constrained routing using :domain_page_or_slug param to
allow for older domain website landing pages to be accessed
displays "Page Not Found" message when website page is not found
corrects routing to index page when creating or updating page
adds feature specs to help enforce routing logic around domain website
requests
Organizer Selects Landing Page Reason for Change
This PR allows an organizer to select which page will serve as the landing page for the website. The thought is that when an event is first announced there will likely be a different page to serve as the landing page than when registration starts and the conference begins.
Moreover, this PR hopefully improves some of the routing complexity needed in order to host multiple websites using custom domains without also getting tangled in the home page for CFP app itself. One challenge the PR hopefully addresses is a possible conflict between routes like
railsconf.org/about
which should route to the latest Railsconf about page andrailsconf.org/railsconf-2021
which should route to the landing page for an older Railsconf site. Since these two urls have similar signatures the route param was renamed to:domain_page_or_slug
for clarity.Changes
Change the default home page Loom Demo