module Jekyll::Algolia::Indexer

def self.index?(index_name)

instead, which will fail if the index does not exist
Note: there is no API endpoint to do that, so we try to get the settings

index_name - Name of the index

Public: Check if an index exists
def self.index?(index_name)
  index(index_name).get_settings
  return true
rescue StandardError
  return false
end