diff --git a/src/pages/faq/index_page.cr b/src/pages/faq/index_page.cr index 9442f40..f963c29 100644 --- a/src/pages/faq/index_page.cr +++ b/src/pages/faq/index_page.cr @@ -7,9 +7,9 @@ class Faq::IndexPage < MainLayout h1 "Frequently Asked Questions" article do auto_redirect + custom_domains why_would_i_want_this other_instances - custom_domains mount Shared::LayoutFooter end end @@ -77,6 +77,39 @@ class Faq::IndexPage < MainLayout end end + private def custom_domains + section do + a name: "custom-domains" + h2 "What about Medium articles on custom domains?" + para do + text <<-TEXT + Scribe can read these also. The URL just needs to end with the + characters at the end of the URL called the Post ID. Here's an + example: + TEXT + end + para do + code "example.com/my-post-" + code "09a6af907a2", class: "highlight" + text " can be converted to " + br + code app_domain + code "/my-post-" + code "09a6af907a2", class: "highlight" + end + para do + text <<-TEXT + The instructions above may redirect custom domains automatically. To + manually redirect a specific custom domain to Scribe, add another + redirect and replace + TEXT + text " " + code "medium\\.com", class: "highlight" + text " with the domain of your choosing." + end + end + end + private def why_would_i_want_this section do h2 "Why Would I Want to Use This?" @@ -126,34 +159,4 @@ class Faq::IndexPage < MainLayout end end end - - private def custom_domains - section do - h2 "What about Medium articles on custom domains?" - para do - text <<-TEXT - Scribe can read these also. The URL just needs to end with the - characters at the end of the URL called the Post ID. Here's an - example: - TEXT - end - para do - code "example.com/my-post-" - code "09a6af907a2", class: "highlight" - text " can be converted to " - br - code app_domain - code "/my-post-" - code "09a6af907a2", class: "highlight" - end - para do - text <<-TEXT - To redirect automatically, follow the intructions above to on how to - redirect medium articles. Replace - TEXT - code " medium\\.com" - text " with the domain of your choosing." - end - end - end end diff --git a/src/pages/home/index_page.cr b/src/pages/home/index_page.cr index 92a082b..2313fd1 100644 --- a/src/pages/home/index_page.cr +++ b/src/pages/home/index_page.cr @@ -12,7 +12,11 @@ class Home::IndexPage < MainLayout href: "/@ftrain/big-data-small-effort-b62607a43a8c" ) end - para "Custom domains work the too. See below for a How-To." + para do + text "Custom domains work too. See " + link "the FAQ", to: Faq::Index.with("custom-domains") + text " for more information." + end article do section do h2 "How-To" @@ -34,20 +38,6 @@ class Home::IndexPage < MainLayout text "/@user/my-post-09a6af907a2" end end - para do - text "For articles on custom domains, instead of replacing " - code "medium.com", class: "highlight" - text " replace the custom domain. E.g. instead of " - code do - span "customdomain.com", class: "highlight" - text "/blog/my-post-09a6af907a2" - end - text " change it to " - code do - span app_domain, class: "highlight" - text "/blog/my-post-09a6af907a2" - end - end end section do h2 "How-To Automatically" diff --git a/src/version.cr b/src/version.cr index a369ddd..efa2c88 100644 --- a/src/version.cr +++ b/src/version.cr @@ -1,3 +1,3 @@ module Scribe - VERSION = "2022-01-04" + VERSION = "2022-01-08" end