Sha256: 07101dac2a661f14aa350822e73bb532d1677a68ac1a9c1e2b82a2798869545e

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

Sitemap.build do | root |
  root.undeleteable!

  root.add(:home) do | home |
    home.undeleteable!

    home.add(:banner) do | banner |
      banner.set(:sort => 'position asc')
      banner.set(:pagination => :off)
      banner.fields(:only => %w(title url image))
      banner.fieldsets(:except => %w(meta advanced))
    end

    home.add(:link) do | link |
      link.set(:sort => 'position asc')
      link.fields(:only => %w(title url image))
      link.fieldsets(:except => %w(meta advanced))
      link.pagination_off!
    end
  end

  root.add(:about) do | about |
    about.undeleteable!

    about.add(:page) do | page |
      page.set(:per_page => 10)
      page.set(:sort => 'title asc')
    end
  end

  root.add(:blog) do | blog |
    blog.undeleteable!

    blog.add(:post) do | post |
      post.set(:per_page => 10)
      post.set(:sort => 'published_at desc')
    end
  end

  root.add(:gallery) do | gallery |
    gallery.undeleteable!

    gallery.add(:gallery) do | gallery |
      gallery.add(:picture) do | picture |
        picture.set(:sort => 'published_at desc')
        picture.pagination_off!
      end
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
qwerty-0.0.7.pre test/dummy/config/sitemap.rb
qwerty-0.0.5.pre test/dummy/config/sitemap.rb
qwerty-0.0.4.pre test/dummy/config/sitemap.rb
qwerty-0.0.3.pre test/dummy/config/sitemap.rb