<commit_before>module Smithy
  module Liquid
    module Drops
      class Page < Base
        delegate :title, :depth, :permalink, :root, :site, :to => '_source'

        def breadcrumbs
          self._source.ancestors.where(["id != ?", root]).map(&:to_liquid)
        end

        def browser_title
          self._source.browser_title.present? ? self._source.browser_title : self.generated_browser_title
        end

        def children
          self._source.children.map(&:to_liquid)
        end

        def container
          self.rendered_containers
        end

        def meta_description
          self._source.description
        end

        def meta_keywords
          self._source.keywords
        end

        def parent
          self._source.parent.to_liquid
        end

        def path
          self._source.url
        end

        def published?
          self._source.published?
        end

        def show_in_navigation?
          self._source.show_in_navigation?
        end

        def root?
          self._source.root?
        end

        def leaf?
          self._source.leaf?
        end

        def child?
          self._source.child?<commit_msg>Added next previous, next_sibling & previous_sibling to page drop<commit_after>module Smithy
  module Liquid
    module Drops
      class Page < Base
        delegate :title, :depth, :permalink, :root, :site, :to => '_source'

        def breadcrumbs
          self._source.ancestors.where(["id != ?", root]).map(&:to_liquid)
        end

        def browser_title
          self._source.browser_title.present? ? self._source.browser_title : self.generated_browser_title
        end

        def children
          self._source.children.map(&:to_liquid)
        end

        def container
          self.rendered_containers
        end

        def meta_description
          self._source.description
        end

        def meta_keywords
          self._source.keywords
        end

        def next
          sibling = if self._source.leaf?
            self._source.right_sibling
          elsif self._source.children.size
            self._source.children.first
          end
          sibling ||= self._source.parent.right_sibling
          sibling.to_liquid
        end

        def next_sibling
          self._source.right_sibling.to_liquid
        end

        def parent
          self._source.parent.to_liquid
        end

        def path
          self._source.url
        end

        def previous
          sibling = if self._source.left_sibling && self._source.left_sibling.leaf?
            self._source.left_sibling
          elsif self._source.left_sibling && self._source.left_sibling.children.size
            self._source.left_sibling.children.last
          end
          sibling ||= self._source.parent
          sibling.to_liquid
        end

        def previous_sibling
          sibling = self._source.left_sibling.to_liquid
        end

        def published?
          self._source.published?
        end

        def show_in_navigation?
          self._source.show_in_navigation?
        end

        def root?
          self._source.root?
        end

        def leaf?
          self._source.leaf?
        end

        def child?
          self._source.child?
{'fraction_non_alphanumeric': 0.06798780487804879, 'fraction_numerical': 0.0, 'mean_word_length': 1.5733333333333333, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '102273', 'n_tokens_mistral': 929, 'n_tokens_neox': 889, 'n_words': 187}