From 178b0a32f0e69eaa029c424322a458989aecfa4b Mon Sep 17 00:00:00 2001 From: Ridhwana Date: Thu, 12 Nov 2020 17:02:58 +0200 Subject: [PATCH] Remove information route and add a temporary redirect to /about for SEO purposes (#11373) * chore: remove information route and add redirect * chore: update messaging * fix: remove additional path referenced --- app/views/layouts/_nav_menu.html.erb | 4 -- app/views/pages/information.html.erb | 57 ---------------------------- config/routes.rb | 6 ++- 3 files changed, 5 insertions(+), 62 deletions(-) delete mode 100644 app/views/pages/information.html.erb diff --git a/app/views/layouts/_nav_menu.html.erb b/app/views/layouts/_nav_menu.html.erb index d8f7be4eb..83428b319 100644 --- a/app/views/layouts/_nav_menu.html.erb +++ b/app/views/layouts/_nav_menu.html.erb @@ -15,7 +15,6 @@ Write a Post Reading list Settings - Key Links
Sign Out @@ -43,9 +42,6 @@ About <%= community_name %> - - Learn more -
<% end %> diff --git a/app/views/pages/information.html.erb b/app/views/pages/information.html.erb deleted file mode 100644 index a8d528127..000000000 --- a/app/views/pages/information.html.erb +++ /dev/null @@ -1,57 +0,0 @@ -<% title "About #{community_qualified_name}" %> - -<%= content_for :page_meta do %> - " /> - - <%= meta_keywords_default %> - - - " /> - - - - - - - "> - - - -<% end %> - - - -
-
-

More information about <%= community_name %> 👋

- - - - <%= render partial: "layouts/social_media" %> -
-
diff --git a/config/routes.rb b/config/routes.rb index 22e3a6bdc..3398f7c6c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -427,8 +427,12 @@ Rails.application.routes.draw do get "/page/:slug" => "pages#show" + # TODO: [forem/teamsmash] removed the /p/information view and added a redirect for SEO purposes. + # We need to remove this route in 2 months (11 January 2021). + get "/p/information", to: redirect("/about") + scope "p" do - pages_actions = %w[welcome editor_guide publishing_from_rss_guide information markdown_basics badges].freeze + pages_actions = %w[welcome editor_guide publishing_from_rss_guide markdown_basics badges].freeze pages_actions.each do |action| get action, action: action, controller: "pages" end