You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: liquid_templates.rb
    path of file: ./repos/bridgetown/bridgetown-core/lib/bridgetown-core/converters
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Bridgetown
  module Converters
    class LiquidTemplates < Converter
      priority :highest
      input :liquid

      attr_reader :site, :document, :layout

      class << self
        attr_accessor :cached_partials
      end

      # rubocop: disable Metrics/AbcSize
      # rubocop: disable Metrics/MethodLength

      # Logic to do the Liquid content conversion.
      #
    
    
      def convert(content, convertible)
        return content if convertible.data[:template_engine] != "liquid"

        self.class.cached_partials ||= {}
        @payload = nil

        @site = convertible.site
        if convertible.is_a?(Bridgetown::Layout)
          @document = convertible.current_document
          @layout = convertible
          configure_payload(layout.current_document_output)
        else
          @document = convertible
          @layout = site.layouts[document.data["layout"]]
          configure_payload
        end