Sha256: 256be3bae5b06f24e3ef00ff280b67839a474951c7a2182bf5de2ef525dcbb4c

Contents?: true

Size: 946 Bytes

Versions: 2

Compression:

Stored size: 946 Bytes

Contents

module Middleman
  module Sitemap
    class AliasResource < ::Middleman::Sitemap::Resource
      
      attr_accessor :output

      def initialize(store, path, alias_path)
        @alias_path = alias_path
        super(store, path)
      end

      def template?
        false
      end

      def render(*args, &block)
        %[
          <html>
            <head>
              <meta http-equiv=refresh content="0; url=#{@alias_path}" />
              <meta name="robots" content="noindex,follow" />
              <meta http-equiv="cache-control" content="no-cache" />
            </head>
            <body>
              <a href="#{@alias_path}">You are being redirected.</a>
            </body>
          </html>
        ]
      end

      def binary?
        false
      end

      def raw_data
        {}
      end

      def ignored?
        false
      end

      def metadata
        @local_metadata.dup
      end


    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
middleman-alias-0.0.6 lib/middleman-alias/alias-resource.rb
middleman-alias-0.0.5 lib/middleman-alias/alias-resource.rb