Unified · Split
| @@ -11,15 +11,26 @@ module Docs · 10 unmodified lines | |||
| 11 | 11 | ||
| 12 | # options[:container] = 'body'; | 12 | # options[:container] = 'body'; |
| 13 | 13 | ||
| 14 | options[:skip_patterns] = [ | 14 | # Fix redirects from older tailwind 2 docs |
| 15 | 15 | options[:fix_urls] = lambda do |url| | |
| 16 | # removed because it focuses on how to use Tailwind with some other niche | 16 | if url.include? "installation/" |
| 17 | # technologies and to also align with DevDoc's Vision, which is" to:" | 17 | break "/docs/installation" |
| 18 | # "indexing only the minimum useful to most developers" that use Tailwind | 18 | end |
| 19 | %r{\/guides\/.*}, | 19 | |
| 20 | 20 | if url.end_with? "/breakpoints" | |
| 21 | # removed so it is easy to "get_type" (see tailwindcss/entries.rb line #15) | 21 | break "/docs/screens#{/#.*$/.match(url)}" |
| 22 | %r{\/colors\z} | 22 | end |
| 23 | if url.end_with? "/adding-base-styles" | ||
| 24 | break "/docs/adding-custom-styles#adding-base-styles" | ||
| 25 | end | ||
| 26 | if url.end_with? "/ring-opacity" | ||
| 27 | break "/docs/ring-color#changing-the-opacity" | ||
| 28 | end | ||
| 29 | |||
| 30 | if url.match(/\/colors#?/) | ||
| 31 | break "/docs/customizing-colors#{/#.*$/.match(url)}" | ||
| 32 | end | ||
| 33 | end | ||
| 23 | 34 | ||
| 24 | options[:skip_patterns] = [ | 35 | options[:skip_patterns] = [ |
| 25 | # Skip setup instructions | 36 | # Skip setup instructions |