Sha256: 4da865099e5157041c3ea2d8a5d13af54030122cc3b48991c3e8d2abf91e49b4

Contents?: true

Size: 752 Bytes

Versions: 11

Compression:

Stored size: 752 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
            @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

11 entries across 11 versions & 1 rubygems

Version Path
locomotivecms_steam-1.0.0.rc8 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.rc6 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.rc4 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.rc3 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.rc2 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.rc1 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.pre.beta.3 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.pre.beta.2 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.pre.beta.1 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.pre.alpha.3 lib/locomotive/steam/liquid/drops/site.rb
locomotivecms_steam-1.0.0.pre.alpha.2 lib/locomotive/steam/liquid/drops/site.rb