Sha256: 1e43a43b35385732f2d2f95eeede18a6b421ade1b17c8cc3dbba25ba8473ff80

Contents?: true

Size: 228 Bytes

Versions: 8

Compression:

Stored size: 228 Bytes

Contents

class RedirectToFilter < Nanoc::Filter
  identifier :redirect_to
  type :text

  def run(content, params = {})
    return content unless params[:redirect_to]
    NanocRedirector.redirect_template(params[:redirect_to])
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nanoc-redirector-0.4.1 lib/redirect-to-filter.rb
nanoc-redirector-0.4.0 lib/redirect-to-filter.rb
nanoc-redirector-0.3.2 lib/redirect-to-filter.rb
nanoc-redirector-0.3.1 lib/redirect-to-filter.rb
nanoc-redirector-0.3.0 lib/redirect-to-filter.rb
nanoc-redirector-0.2.1 lib/redirect-to-filter.rb
nanoc-redirector-0.2.0 lib/redirect-to-filter.rb
nanoc-redirector-0.1.0 lib/redirect-to-filter.rb