From e52330e7b51d46dc76116ce988b7ab64d8ab2b8f Mon Sep 17 00:00:00 2001 From: mbernier Date: Wed, 29 Apr 2015 12:10:29 -0600 Subject: [PATCH 1/6] Added pageless redirects plugin https://github.com/nquinlan/jekyll-pageless-redirects --- plugins/pageless_redirects.rb | 165 ++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100755 plugins/pageless_redirects.rb diff --git a/plugins/pageless_redirects.rb b/plugins/pageless_redirects.rb new file mode 100755 index 0000000000..8f642093fa --- /dev/null +++ b/plugins/pageless_redirects.rb @@ -0,0 +1,165 @@ +# Pageless Redirect Generator +# +# Generates redirect pages based on YAML or htaccess style redirects +# +# To generate redirects create _redirects.yml, _redirects.htaccess, and/or _redirects.json in the Jekyll root directory +# both follow the pattern alias, final destination. +# +# Example _redirects.yml +# +# initial-page : /destination-page +# other-page : http://example.org/destination-page +# "another/page" : /destination-page +# +# Result: +# Requests to /initial-page are redirected to /destination-page +# Requests to /other-page are redirected to http://example.org/destination-page +# Requests to /another/page are redirected to /destination-page +# +# +# Example _redirects.htaccess +# +# Redirect /some-page /destination-page +# Redirect 301 /different-page /destination-page +# Redirect cool-page http://example.org/destination-page +# +# Result: +# Requests to /some-page are redirected to /destination-page +# Requests to /different-page are redirected to /destination-page +# Requests to /cool-page are redirected to http://example.org/destination-page +# +# +# Example _redirects.json +# +# { +# "some-page" : "/destination-page", +# "yet-another-page" : "http://example.org/destination-page", +# "ninth-page" : "/destination-page" +# } +# +# Result: +# Requests to /some-page are redirected to /destination-page +# Requests to /yet-another-page are redirected to http://example.org/destination-page +# Requests to /ninth-page are redirected to /destination-page +# +# +# Author: Nick Quinlan +# Site: http://nicholasquinlan.com +# Plugin Source: https://github.com/nquinlan/jekyll-pageless-redirects +# Plugin License: MIT +# Plugin Credit: This plugin borrows heavily from alias_generator (http://github.com/tsmango/jekyll_alias_generator) by Thomas Mango (http://thomasmango.com) + +require 'json' + +module Jekyll + + class PagelessRedirectGenerator < Generator + + def generate(site) + @site = site + + process_yaml + process_htaccess + process_json + end + + def process_yaml + file_path = @site.source + "/_redirects.yml" + if File.exists?(file_path) + YAML.load_file(file_path, :safe => true).each do | new_url, old_url | + generate_aliases( old_url, new_url ) + end + end + end + + def process_htaccess + file_path = @site.source + "/_redirects.htaccess" + if File.exists?(file_path) + # Read the file line by line pushing redirects to the redirects array + file = File.new(file_path, "r") + while (line = file.gets) + # Match the line against a regex, if it matches push it to the object + /^Redirect(\s+30[1237])?\s+(.+?)\s+(.+?)$/.match(line) { | matches | + generate_aliases( matches[3], matches[2]) + } + end + file.close + end + end + + def process_json + file_path = @site.source + "/_redirects.json" + if File.exists?(file_path) + file = File.new(file_path, "r") + content = JSON.parse(file.read) + content.each do |new_url, old_url| + generate_aliases(old_url, new_url) + end + file.close + end + end + + def generate_aliases(destination_path, aliases) + alias_paths ||= Array.new + alias_paths << aliases + alias_paths.compact! + + alias_paths.flatten.each do |alias_path| + alias_path = alias_path.to_s + + alias_dir = File.extname(alias_path).empty? ? alias_path : File.dirname(alias_path) + alias_file = File.extname(alias_path).empty? ? "index.html" : File.basename(alias_path) + + fs_path_to_dir = File.join(@site.dest, alias_dir) + alias_index_path = File.join(alias_dir, alias_file) + + FileUtils.mkdir_p(fs_path_to_dir) + + File.open(File.join(fs_path_to_dir, alias_file), 'w') do |file| + file.write(alias_template(destination_path)) + end + + (alias_index_path.split('/').size + 1).times do |sections| + @site.static_files << Jekyll::PagelessRedirectFile.new(@site, @site.dest, alias_index_path.split('/')[0, sections].join('/'), '') + end + end + end + + def alias_template(destination_path) + <<-EOF + + + + Redirecting... + + + + + +

Redirecting...

+

Click here if you are not redirected.

+ + + + EOF + end + end + + class PagelessRedirectFile < StaticFile + require 'set' + + def destination(dest) + File.join(dest, @dir) + end + + def modified? + return false + end + + def write(dest) + return true + end + end +end From 8916a05830202bab66ad48ebb1322c748c8a8c5b Mon Sep 17 00:00:00 2001 From: mbernier Date: Wed, 29 Apr 2015 12:12:53 -0600 Subject: [PATCH 2/6] added a redirects file for testing --- _redirects.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _redirects.yml diff --git a/_redirects.yml b/_redirects.yml new file mode 100644 index 0000000000..3ec49c1fcd --- /dev/null +++ b/_redirects.yml @@ -0,0 +1 @@ +initial-page : /destination-page From 420224758124c9f791b604c164a990ea00684731 Mon Sep 17 00:00:00 2001 From: mbernier Date: Wed, 29 Apr 2015 14:19:08 -0600 Subject: [PATCH 3/6] another test --- _redirects.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_redirects.yml b/_redirects.yml index 3ec49c1fcd..d26e841a82 100644 --- a/_redirects.yml +++ b/_redirects.yml @@ -1 +1 @@ -initial-page : /destination-page +"User_Guide/index.zhtml" : "/User_Guide/sending_practices.html" \ No newline at end of file From 7139c39909c9ec852d12d102e060d290afd903cb Mon Sep 17 00:00:00 2001 From: mbernier Date: Wed, 29 Apr 2015 14:58:51 -0600 Subject: [PATCH 4/6] Added beginning of the redirects list --- _redirects.yml | 1 - source/_redirects.htaccess | 41 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) delete mode 100644 _redirects.yml create mode 100644 source/_redirects.htaccess diff --git a/_redirects.yml b/_redirects.yml deleted file mode 100644 index d26e841a82..0000000000 --- a/_redirects.yml +++ /dev/null @@ -1 +0,0 @@ -"User_Guide/index.zhtml" : "/User_Guide/sending_practices.html" \ No newline at end of file diff --git a/source/_redirects.htaccess b/source/_redirects.htaccess new file mode 100644 index 0000000000..4aef604432 --- /dev/null +++ b/source/_redirects.htaccess @@ -0,0 +1,41 @@ +Redirect 301 /User_Guide/reconfirmation.html sendgrid.com/docs/Marketing_Emails/Email_Marketing_Campaigns/reconfirmation.html +Redirect 301 /User_Guide/peer_invitations.html sendgrid.com/docs/Marketing_Emails/Email_Marketing_Campaigns/peer_invitations.html +Redirect 301 /User_Guide/attachments.html sendgrid.com/docs/User_Guide/Deliverability/attachments.html +Redirect 301 /User_Guide/managing_unsubscribes.html sendgrid.com/docs/User_Guide/Subscription_Tracking/index.html +Redirect 301 /User_Guide/multiple_credentials.html sendgrid.com/docs/User_Guide/Account_Settings/multiple_credentials.html +Redirect 301 /User_Guide/sending_practices.html sendgrid.com/docs/User_Guide/Account/account_changes.html +Redirect 301 /User_Guide/smtp_ports.html sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/smtp_ports.html +Redirect 301 /User_Guide/template_engine_setup.html sendgrid.com/docs/Transactional_Email/Template_Engine/setup_guide.html +Redirect 301 /User_Guide/warming_up.html sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/warming_up.html +Redirect 301 /VidGrid/Email_Activity/activity.html sendgrid.com/docs/VidGrid/email_activity.html +Redirect 301 /VidGrid/Marketing_Emails/Setup/overview.html sendgrid.com/docs/VidGrid/Marketing_Emails/marketing_emails_setup.html +Redirect 301 /VidGrid/Template_Engine/template_engine.html sendgrid.com/docs/VidGrid/template_engine.html +Redirect 301 /VidGrid/Whitelabel/whitelabel.html sendgrid.com/docs/VidGrid/whitelabel.html +Redirect 301 /API_Reference/Reseller_API/billing_retrieving_as_you_go_usage.html sendgrid.com/docs/API_Reference/Reseller_API/v2_(deprecated)/billing_retrieving_as_you_go_usage.html +Redirect 301 /API_Reference/Reseller_API/billing_retrieving_end_users_invoices_usage.html sendgrid.com/docs/API_Reference/Reseller_API/v2_(deprecated)/billing_retrieving_end_users_invoices_usage.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_account_limits.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer_subuser_account_limits.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_apps.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_apps.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_automatic_login.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_automatic_login.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_bounces.htm sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_bounces.htm +Redirect 301 /API_Reference/Reseller_API/customer_subuser_event_notification_url.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_event_notification_url.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_invalid_emails.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_invalid_emails.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_monitor_outgoing_email.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_monitor_outgoing_email.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_parse_settings.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_parse_settings.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_spam_reports.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_spam_reports.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_statistics.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_statistics.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_timezone.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_timezone.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_unsubscribes.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_unsubscribes.html +Redirect 301 /User_Guide/advanced_suppression_manager.html sendgrid.com/docs/User_Guide/Email_Deliverability/Subscription_Tracking/index.html +Redirect 301 /User_Guide/attachments.html sendgrid.com/docs/User_Guide/Email_Deliverability/attachments.html +Redirect 301 /User_Guide/whitelabel_wizard.html sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/whitelabel_wizard.html +Redirect 301 /User_Guide/warming_up.html sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/warming_up.html +Redirect 301 /User_Guide/smtp_ports.html sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/smtp_ports.html +Redirect 301 /User_Guide/template_engine_setup.html sendgrid.com/docs/Transactional_Email/Template_Engine/setup_guide.html +Redirect 301 /Integrate/Mail_Clients/outlook_2010.html sendgrid.com/docs/Integrate/Mail_Clients/outlook_2013.html +Redirect 301 /API_Reference/Customer_Subuser_API/event_notification_url.md sendgrid.com/docs/API_Reference/Customer_Subuser_API/v1_(deprecated)/event_notification_url.md +Redirect 301 /Marketing_Emails/Email_Marketing_Campaigns sendgrid.com/docs/Glossary/Email_Types +Redirect 301 /Marketing_Emails/ sendgrid.com/docs/User_Guide/Marketing_Emails/ +Redirect 301 /Transactional_Email/ sendgrid.com/docs/User_Guide/Transactional_Email/ +Redirect 301 /Apps/ sendgrid.com/docs/User_Guide/Apps/ +Redirect 301 /Delivery_Metrics/ sendgrid.com/docs/User_Guide/Delivery_Metrics/ +Redirect 301 /Code_Examples/ sendgrid.com/docs/Integrate/Code_Examples/ \ No newline at end of file From 400bc3a3c6b477a5f81d68f8b3369269ee1eb232 Mon Sep 17 00:00:00 2001 From: mbernier Date: Wed, 29 Apr 2015 15:53:39 -0600 Subject: [PATCH 5/6] created redirects for the old pages that have been moved --- source/_redirects.htaccess | 198 +++++++++++++++++++++++++++++-------- 1 file changed, 157 insertions(+), 41 deletions(-) diff --git a/source/_redirects.htaccess b/source/_redirects.htaccess index 4aef604432..06806d7e1f 100644 --- a/source/_redirects.htaccess +++ b/source/_redirects.htaccess @@ -1,41 +1,157 @@ -Redirect 301 /User_Guide/reconfirmation.html sendgrid.com/docs/Marketing_Emails/Email_Marketing_Campaigns/reconfirmation.html -Redirect 301 /User_Guide/peer_invitations.html sendgrid.com/docs/Marketing_Emails/Email_Marketing_Campaigns/peer_invitations.html -Redirect 301 /User_Guide/attachments.html sendgrid.com/docs/User_Guide/Deliverability/attachments.html -Redirect 301 /User_Guide/managing_unsubscribes.html sendgrid.com/docs/User_Guide/Subscription_Tracking/index.html -Redirect 301 /User_Guide/multiple_credentials.html sendgrid.com/docs/User_Guide/Account_Settings/multiple_credentials.html -Redirect 301 /User_Guide/sending_practices.html sendgrid.com/docs/User_Guide/Account/account_changes.html -Redirect 301 /User_Guide/smtp_ports.html sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/smtp_ports.html -Redirect 301 /User_Guide/template_engine_setup.html sendgrid.com/docs/Transactional_Email/Template_Engine/setup_guide.html -Redirect 301 /User_Guide/warming_up.html sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/warming_up.html -Redirect 301 /VidGrid/Email_Activity/activity.html sendgrid.com/docs/VidGrid/email_activity.html -Redirect 301 /VidGrid/Marketing_Emails/Setup/overview.html sendgrid.com/docs/VidGrid/Marketing_Emails/marketing_emails_setup.html -Redirect 301 /VidGrid/Template_Engine/template_engine.html sendgrid.com/docs/VidGrid/template_engine.html -Redirect 301 /VidGrid/Whitelabel/whitelabel.html sendgrid.com/docs/VidGrid/whitelabel.html -Redirect 301 /API_Reference/Reseller_API/billing_retrieving_as_you_go_usage.html sendgrid.com/docs/API_Reference/Reseller_API/v2_(deprecated)/billing_retrieving_as_you_go_usage.html -Redirect 301 /API_Reference/Reseller_API/billing_retrieving_end_users_invoices_usage.html sendgrid.com/docs/API_Reference/Reseller_API/v2_(deprecated)/billing_retrieving_end_users_invoices_usage.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_account_limits.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer_subuser_account_limits.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_apps.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_apps.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_automatic_login.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_automatic_login.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_bounces.htm sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_bounces.htm -Redirect 301 /API_Reference/Reseller_API/customer_subuser_event_notification_url.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_event_notification_url.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_invalid_emails.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_invalid_emails.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_monitor_outgoing_email.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_monitor_outgoing_email.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_parse_settings.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_parse_settings.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_spam_reports.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_spam_reports.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_statistics.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_statistics.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_timezone.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_timezone.html -Redirect 301 /API_Reference/Reseller_API/customer_subuser_unsubscribes.html sendgrid.com/docs/API_Reference/Reseller_API/Customer_Subuser/customer__subuser_unsubscribes.html -Redirect 301 /User_Guide/advanced_suppression_manager.html sendgrid.com/docs/User_Guide/Email_Deliverability/Subscription_Tracking/index.html -Redirect 301 /User_Guide/attachments.html sendgrid.com/docs/User_Guide/Email_Deliverability/attachments.html -Redirect 301 /User_Guide/whitelabel_wizard.html sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/whitelabel_wizard.html -Redirect 301 /User_Guide/warming_up.html sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/warming_up.html -Redirect 301 /User_Guide/smtp_ports.html sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/smtp_ports.html -Redirect 301 /User_Guide/template_engine_setup.html sendgrid.com/docs/Transactional_Email/Template_Engine/setup_guide.html -Redirect 301 /Integrate/Mail_Clients/outlook_2010.html sendgrid.com/docs/Integrate/Mail_Clients/outlook_2013.html -Redirect 301 /API_Reference/Customer_Subuser_API/event_notification_url.md sendgrid.com/docs/API_Reference/Customer_Subuser_API/v1_(deprecated)/event_notification_url.md -Redirect 301 /Marketing_Emails/Email_Marketing_Campaigns sendgrid.com/docs/Glossary/Email_Types -Redirect 301 /Marketing_Emails/ sendgrid.com/docs/User_Guide/Marketing_Emails/ -Redirect 301 /Transactional_Email/ sendgrid.com/docs/User_Guide/Transactional_Email/ -Redirect 301 /Apps/ sendgrid.com/docs/User_Guide/Apps/ -Redirect 301 /Delivery_Metrics/ sendgrid.com/docs/User_Guide/Delivery_Metrics/ -Redirect 301 /Code_Examples/ sendgrid.com/docs/Integrate/Code_Examples/ \ No newline at end of file + +####### +# +# /API_Reference > Customer Subuser API +# +####### +Redirect 301 /API_Reference/Customer_Subuser_API/event_notification_url.html https://sendgrid.com/docs/API_Reference/Customer_Subuser_API/v1_(deprecated)/event_notification_url.html + +####### +# +# /API_Reference > Reseller API +# +####### +Redirect 301 /API_Reference/Reseller_API/billing_retrieving_as_you_go_usage.html https://sendgrid.com/docs/API_Reference/Reseller_API/v1_(deprecated)/billing_retrieving_as_you_go_usage.html +Redirect 301 /API_Reference/Reseller_API/billing_retrieving_end_users_invoices_usage.html https://sendgrid.com/docs/API_Reference/Reseller_API/v1_(deprecated)/billing_retrieving_end_users_invoices_usage.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_account_limits.html https://sendgrid.com/docs/API_Reference/Reseller_API/v1_(deprecated)/customer_account_limits.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_apps.html https://sendgrid.com/docs/API_Reference/Reseller_API/v1_(deprecated)/customer_subuser_apps_filters.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_automatic_login.html https://sendgrid.com/docs/API_Reference/Reseller_API/v1_(deprecated)/automatic_login.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_bounces.htm https://sendgrid.com/docs/API_Reference/Reseller_API/Reseller_Customer_Subuser_API/customer_subuser_bounces.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_event_notification_url.html https://sendgrid.com/docs/API_Reference/Reseller_API/Reseller_Customer_Subuser_API/customer_subuser_event_notification_url.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_invalid_emails.html https://sendgrid.com/docs/API_Reference/Reseller_API/Reseller_Customer_Subuser_API/customer_subuser_invalid_emails.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_monitor_outgoing_email.html https://sendgrid.com/docs/API_Reference/Reseller_API/Reseller_Customer_Subuser_API/customer_subuser_monitor_outgoing_email.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_parse_settings.html https://sendgrid.com/docs/API_Reference/Reseller_API/Reseller_Customer_Subuser_API/customer_subuser_parse_settings.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_spam_reports.html https://sendgrid.com/docs/API_Reference/Reseller_API/Reseller_Customer_Subuser_API/customer_subuser_spam_reports.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_statistics.html https://sendgrid.com/docs/API_Reference/Reseller_API/Reseller_Customer_Subuser_API/customer_subuser_statistics.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_timezone.html https://sendgrid.com/docs/API_Reference/Reseller_API/Reseller_Customer_Subuser_API/customer_subuser_timezone.html +Redirect 301 /API_Reference/Reseller_API/customer_subuser_unsubscribes.html https://sendgrid.com/docs/API_Reference/Reseller_API/Reseller_Customer_Subuser_API/customer_subuser_unsubscribes.html + +####### +# +# /docs/Apps - moved to User Guide - originally sendgrid.com/docs/Apps/ +# +####### +Redirect 301 /Apps/index.html https://sendgrid.com/docs/User_Guide/Apps/index.html +Redirect 301 /Apps/address_whitelisting.html https://sendgrid.com/docs/User_Guide/Apps/address_whitelisting.html +Redirect 301 /Apps/bcc.html https://sendgrid.com/docs/User_Guide/Apps/bcc.html +Redirect 301 /Apps/bypass_list_management.html https://sendgrid.com/docs/User_Guide/Apps/bypass_list_management.html +Redirect 301 /Apps/click_tracking.html https://sendgrid.com/docs/User_Guide/Apps/click_tracking.html +Redirect 301 /Apps/domain_keys.html https://sendgrid.com/docs/User_Guide/Apps/domain_keys.html +Redirect 301 /Apps/dkim.html https://sendgrid.com/docs/User_Guide/Apps/dkim.html +Redirect 301 /Apps/email_templates.html https://sendgrid.com/docs/User_Guide/Apps/email_templates.html +Redirect 301 /Apps/event_notification.html https://sendgrid.com/docs/User_Guide/Apps/event_notification.html +Redirect 301 /Apps/footer.html https://sendgrid.com/docs/User_Guide/Apps/footer.html +Redirect 301 /Apps/forward_spam.html https://sendgrid.com/docs/User_Guide/Apps/forward_spam.html +Redirect 301 /Apps/google_analytics.html https://sendgrid.com/docs/User_Guide/Apps/google_analytics.html +Redirect 301 /Apps/gravatar.html https://sendgrid.com/docs/User_Guide/Apps/gravatar.html +Redirect 301 /Apps/new_relic.html https://sendgrid.com/docs/User_Guide/Apps/new_relic.html +Redirect 301 /Apps/open_tracking.html https://sendgrid.com/docs/User_Guide/Apps/open_tracking.html +Redirect 301 /Apps/sendwithus.html https://sendgrid.com/docs/User_Guide/Apps/sendwithus.html +Redirect 301 /Apps/spam_checker.html https://sendgrid.com/docs/User_Guide/Apps/spam_checker.html +Redirect 301 /Apps/subscription_tracking.html https://sendgrid.com/docs/User_Guide/Apps/subscription_tracking.html +Redirect 301 /Apps/template_engine.html https://sendgrid.com/docs/User_Guide/Apps/template_engine.html + +####### +# +# /docs/Code_Examples - moved to User Guide - originally sendgrid.com/docs/Code_Examples +# +####### +Redirect 301 /Code_Examples/index.html https://sendgrid.com/docs/Integrate/Code_Examples/index.html +Redirect 301 /Code_Examples/index.htmlhttps://sendgrid.com/docs/Integrate/Code_Examples/index.html +Redirect 301 /Code_Examples/csharp.html https://sendgrid.com/docs/Integrate/Code_Examples/csharp.html +Redirect 301 /Code_Examples/go.html https://sendgrid.com/docs/Integrate/Code_Examples/go.html +Redirect 301 /Code_Examples/ios.html https://sendgrid.com/docs/Integrate/Code_Examples/ios.html +Redirect 301 /Code_Examples/java.html https://sendgrid.com/docs/Integrate/Code_Examples/java.html +Redirect 301 /Code_Examples/nodejs.html https://sendgrid.com/docs/Integrate/Code_Examples/nodejs.html +Redirect 301 /Code_Examples/perl.htmlhttps://sendgrid.com/docs/Integrate/Code_Examples/perl.html +Redirect 301 /Code_Examples/php.html https://sendgrid.com/docs/Integrate/Code_Examples/php.html +Redirect 301 /Code_Examples/python.html https://sendgrid.com/docs/Integrate/Code_Examples/python.html +Redirect 301 /Code_Examples/ruby.html https://sendgrid.com/docs/Integrate/Code_Examples/ruby.html +Redirect 301 /Code_Examples/Webhook_Examples/index.html https://sendgrid.com/docs/Integrate/Code_Examples/Webhook_Examples/index.html +Redirect 301 /Code_Examples/Webhook_Examples/go.html https://sendgrid.com/docs/Integrate/Code_Examples/Webhook_Examples/go.html +Redirect 301 /Code_Examples/Webhook_Examples/nodejs.html https://sendgrid.com/docs/Integrate/Code_Examples/Webhook_Examples/nodejs.html +Redirect 301 /Code_Examples/Webhook_Examples/php.html https://sendgrid.com/docs/Integrate/Code_Examples/Webhook_Examples/php.html +Redirect 301 /Code_Examples/Webhook_Examples/python.htmlhttps://sendgrid.com/docs/Integrate/Code_Examples/Webhook_Examples/python.html +Redirect 301 /Code_Examples/Webhook_Examples/csharp.html https://sendgrid.com/docs/Integrate/Code_Examples/Webhook_Examples/csharp.html +Redirect 301 /Code_Examples/SMTP_API_Header_Examples/index.html https://sendgrid.com/docs/Integrate/Code_Examples/SMTP_API_Header_Examples/index.html +Redirect 301 /Code_Examples/SMTP_API_Header_Examples/go.html https://sendgrid.com/docs/Integrate/Code_Examples/SMTP_API_Header_Examples/go.html +Redirect 301 /Code_Examples/SMTP_API_Header_Examples/nodejs.html https://sendgrid.com/docs/Integrate/Code_Examples/SMTP_API_Header_Examples/nodejs.html +Redirect 301 /Code_Examples/SMTP_API_Header_Examples/perl.html https://sendgrid.com/docs/Integrate/Code_Examples/SMTP_API_Header_Examples/perl.html +Redirect 301 /Code_Examples/SMTP_API_Header_Examples/php.html https://sendgrid.com/docs/Integrate/Code_Examples/SMTP_API_Header_Examples/php.html +Redirect 301 /Code_Examples/SMTP_API_Header_Examples/python.html https://sendgrid.com/docs/Integrate/Code_Examples/SMTP_API_Header_Examples/python.html +Redirect 301 /Code_Examples/SMTP_API_Header_Examples/ruby.html https://sendgrid.com/docs/Integrate/Code_Examples/SMTP_API_Header_Examples/ruby.html + +####### +# +# /docs/Delivery_Metrics - moved to User Guide - originally sendgrid.com/docs/Delivery_Metrics/ +# +####### +Redirect 301 /Delivery_Metrics/index.html https://sendgrid.com/docs/User_Guide/Delivery_Metrics/index.html +Redirect 301 /Delivery_Metrics/advanced_statistics.html https://sendgrid.com/docs/User_Guide/Delivery_Metrics/advanced_statistics.html +Redirect 301 /Delivery_Metrics/alerts.html https://sendgrid.com/docs/User_Guide/Delivery_Metrics/alerts.html +Redirect 301 /Delivery_Metrics/categories.html https://sendgrid.com/docs/User_Guide/Delivery_Metrics/categories.html +Redirect 301 /Delivery_Metrics/email_activity.html https://sendgrid.com/docs/User_Guide/Delivery_Metrics/email_activity.html +Redirect 301 /Delivery_Metrics/email_error_messages.html https://sendgrid.com/docs/User_Guide/Delivery_Metrics/email_error_messages.html +Redirect 301 /Delivery_Metrics/email_reports.html https://sendgrid.com/docs/User_Guide/Delivery_Metrics/email_reports.html + +####### +# +# /docs/Integrate +# +####### +Redirect 301 /Integrate/Mail_Clients/outlook_2010.html https://sendgrid.com/docs/Integrate/Mail_Clients/outlook_2013.html + +####### +# +# /docs/Marketing Email - moved to User Guide - originally sendgrid.com/docs/Marketing_Emails/ +# +####### +Redirect 301 /Marketing_Emails/Email_Marketing_Campaigns https://sendgrid.com/docs/Glossary/Email_Types +Redirect 301 /Marketing_Emails/ https://sendgrid.com/docs/User_Guide/Marketing_Emails/ +Redirect 301 /Marketing_Emails/analytics.html https://sendgrid.com/docs +Redirect 301 /Marketing_Emails/create_manage.html https://sendgrid.com/docs +Redirect 301 /Marketing_Emails/dashboard.html https://sendgrid.com/docs +Redirect 301 /Marketing_Emails/tags.html https://sendgrid.com/docs +Redirect 301 /Marketing_Emails/unsubscribes.html https://sendgrid.com/docs +Redirect 301 /Marketing_Emails/recipients.html https://sendgrid.com/docs +Redirect 301 /Marketing_Emails/sender_address.html https://sendgrid.com/docs + +####### +# +# /docs/Transactional Email - moved to User Guide - originally sendgrid.com/docs/Transactional_Email +# +####### +Redirect 301 /Transactional_Email/index.html https://sendgrid.com/docs/User_Guide/Transactional_Email/index.html +Redirect 301 /Transactional_Email/unsubscribes.html https://sendgrid.com/docs/User_Guide/Transactional_Email/unsubscribes.html +Redirect 301 /Transactional_Email/Template_Engine/setup_guide.html https://sendgrid.com/docs/User_Guide/Transactional_Email/Template_Engine/setup_guide.html + +####### +# +# /docs/User Guide +# +####### +Redirect 301 /User_Guide/advanced_suppression_manager.html https://sendgrid.com/docs/User_Guide/Email_Deliverability/Subscription_Tracking/index.html +Redirect 301 /User_Guide/attachments.html https://sendgrid.com/docs/User_Guide/Email_Deliverability/attachments.html +Redirect 301 /User_Guide/managing_unsubscribes.html https://sendgrid.com/docs/User_Guide/Subscription_Tracking/index.html +Redirect 301 /User_Guide/multiple_credentials.html https://sendgrid.com/docs/User_Guide/Account_Settings/multiple_credentials.html +Redirect 301 /User_Guide/peer_invitations.html https://sendgrid.com/docs/Marketing_Emails/Email_Marketing_Campaigns/peer_invitations.html +Redirect 301 /User_Guide/reconfirmation.html https://sendgrid.com/docs/Marketing_Emails/Email_Marketing_Campaigns/reconfirmation.html +Redirect 301 /User_Guide/sending_practices.html https://sendgrid.com/docs/User_Guide/Account/account_changes.html +Redirect 301 /User_Guide/smtp_ports.html https://sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/smtp_ports.html +Redirect 301 /User_Guide/template_engine_setup.html https://sendgrid.com/docs/Transactional_Email/Template_Engine/setup_guide.html +Redirect 301 /User_Guide/template_engine_setup.html https://sendgrid.com/docs/User_Guide/Transactional_Email/Template_Engine/setup_guide.html +Redirect 301 /User_Guide/warming_up.html https://sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/warming_up.html +Redirect 301 /User_Guide/whitelabel_wizard.html https://sendgrid.com/docs/User_Guide/Setting_Up_Your_Server/whitelabel_wizard.html + +####### +# +# /docs/VidGrid +# +####### +Redirect 301 /VidGrid/Email_Activity/activity.html https://sendgrid.com/docs/VidGrid/email_activity.html +Redirect 301 /VidGrid/Marketing_Emails/Setup/overview.html https://sendgrid.com/docs/VidGrid/Marketing_Emails/marketing_emails_setup.html +Redirect 301 /VidGrid/Template_Engine/template_engine.html https://sendgrid.com/docs/VidGrid/template_engine.html +Redirect 301 /VidGrid/Whitelabel/whitelabel.html https://sendgrid.com/docs/VidGrid/whitelabel.html + + + From ebcfab3cc5c1020af165188712c1dc303e01d22c Mon Sep 17 00:00:00 2001 From: mbernier Date: Wed, 29 Apr 2015 16:21:06 -0600 Subject: [PATCH 6/6] adjusted to have output during build --- plugins/pageless_redirects.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/pageless_redirects.rb b/plugins/pageless_redirects.rb index 8f642093fa..a5c6bda016 100755 --- a/plugins/pageless_redirects.rb +++ b/plugins/pageless_redirects.rb @@ -116,6 +116,7 @@ def generate_aliases(destination_path, aliases) FileUtils.mkdir_p(fs_path_to_dir) File.open(File.join(fs_path_to_dir, alias_file), 'w') do |file| + puts "generating redirect for " + alias_path + " to " + destination_path file.write(alias_template(destination_path)) end