module JekyllRedirectFrom::Redirectable
Module which can be mixed in to documents (and pages) to provide redirect_to
and redirect_from
helpers
Public Instance Methods
Source
# File lib/jekyll-redirect-from/redirectable.rb, line 19 def redirect_from if to_liquid["redirect_from"].is_a?(Array) to_liquid["redirect_from"].compact else [to_liquid["redirect_from"]].compact end end
Returns an array representing the relative paths to other documents which should be redirected to this document
Source
# File lib/jekyll-redirect-from/redirectable.rb, line 9 def redirect_to if to_liquid["redirect_to"].is_a?(Array) to_liquid["redirect_to"].compact.first else to_liquid["redirect_to"] end end
Returns a string representing the relative path or URL to which the document should be redirected