Sha256: 865012b8c49730ea8a996e1950c0285f1fb626dfa6a75e1e578b0d6c66e032cd

Contents?: true

Size: 741 Bytes

Versions: 3

Compression:

Stored size: 741 Bytes

Contents

module Locomotive
  module Steam
    module Liquid
      module Drops
        class Site < I18nBase

          delegate :name, :domains, :seo_title, :meta_keywords, :meta_description, to: :@_source

          def index
            @index ||= repository.root.to_liquid
          end

          def pages
            liquify(*self.scoped_pages)
          end

          protected

          def repository
            @context.registers[:services].repositories.page
          end

          def scoped_pages
            conditions = @context['with_scope'] || {}
            conditions['slug.ne']   = '404'
            conditions[:published]  = true
            repository.all(conditions)
          end

        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
locomotivecms_steam-1.0.0 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.rc10 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.rc9 lib/locomotive/steam/liquid/drops/site.rb