[bug] empty yml fields breaks build
see https://github.com/DIYbiosphere/sphere/issues/256#issuecomment-544466378
The build failures on netlify seem to have been caused by the jekyll-algolia plugin getting empty _geoloc.lat or _geoloc.lng fields on an entry (see bottom of this build log).
3:47:32 AM: [jekyll-algolia] Error:
3:47:32 AM: 400: Cannot POST to https://ITI5JHZJM9.algolia.net/1/indexes/*/batch:
3:47:32 AM: {"message":"_geoloc.lat or _geoloc.lng attributes cannot be null near line:1
3:47:32 AM: column:13786","status":400} (400)
I think this file was the problem:
- https://github.com/DIYbiosphere/sphere/blob/415dbedcca4b442a8f766c57878237954a23ec1d/_startups/CellEleven/CellEleven.md
I removed the empty fields and the build succeeded:
- https://github.com/DIYbiosphere/sphere/commit/120bc1abb2f068a6266c23c2075e0afe6a9d998e
- https://app.netlify.com/sites/diybiosphere/deploys/5dad8ddb4a152e00086db198
now lets see if merging staging to master results in a good build...
I just mreged staging into master #272 and it seems to have worked.
https://app.netlify.com/sites/diybiosphere/deploys/5dad8fefc3371300081a40a1
so, going forward, just comment out any empty fields in the yml frontmatter.
good
#BASIC INFO
title: Cell Eleven
subtitle: Democratized Biotech
type-org: startup
#LOCATION
# address: # street and number
city: Philadelphia
state: Pennsylvania
postcode: 19135
country: United States
# _geoloc: # Geolocation coordinates for mapping
# lat: # latitude number
# lng: # longitude number
---
bad
---
#BASIC INFO
title: Cell Eleven
subtitle: Democratized Biotech
type-org: startup
#LOCATION
address:
city: Philadelphia
state: Pennsylvania
postcode: 19135
country: United States
_geoloc: # Geolocation coordinates for mapping
lat: # WARNING THIS IS BLANK AND WILL BREAK BUILD # latitude number
lng: # WARNING THIS IS BLANK AND WILL BREAK BUILD # longitude number
---
I think some sort of sanity check implementation on the Netify side can be implemented to fix this issue moving forward