Showing the changes to lib (1 of 2 files). Show all
Unified · Split
| @@ -141,6 +141,18 @@ class App < Sinatra::Application · 140 unmodified lines | |||
| 141 | settings.news_feed | 141 | settings.news_feed |
| 142 | end | 142 | end |
| 143 | 143 | ||
| 144 | get '/s/tw' do | ||
| 145 | redirect 'https://twitter.com/intent/tweet?url=http%3A%2F%2Fdevdocs.io&via=DevDocs&text=All-in-one%2C%20quickly%20searchable%20API%20docs%3A' | ||
| 146 | end | ||
| 147 | |||
| 148 | get '/s/fb' do | ||
| 149 | redirect 'https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fdevdocs.io' | ||
| 150 | end | ||
| 151 | |||
| 152 | get '/s/re' do | ||
| 153 | redirect 'http://www.reddit.com/submit?url=http%3A%2F%2Fdevdocs.io&title=All-in-one%2C%20quickly%20searchable%20API%20docs&resubmit=true' | ||
| 154 | end | ||
| 155 | |||
| 144 | get %r{\A/(\w+)(\-[\w\-]+)?(/)?(.+)?\z} do |doc, type, slash, rest| | 156 | get %r{\A/(\w+)(\-[\w\-]+)?(/)?(.+)?\z} do |doc, type, slash, rest| |
| 145 | return 404 unless @doc = settings.docs[doc] | 157 | return 404 unless @doc = settings.docs[doc] |
| 146 | 158 | ||