Liquid error: undefined method `pages' for nil:NilClass