Sha256: 5eeeb6d17f9958e40ae56480fd0ee47c3bd46ebeb218f168b20dc36b368c514c

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

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 source_file
        nil
      end

      def template?
        false
      end

      def render(*args, &block)
        %[
          <html>
            <head>
              <link rel="canonical" href="#{@alias_path}" />
              <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

1 entries across 1 versions & 1 rubygems

Version Path
middleman-alias-0.0.10 lib/middleman-alias/alias-resource.rb