fossfoundation icon indicating copy to clipboard operation
fossfoundation copied to clipboard

Improve site builds and define data file standards

Open ShaneCurcuru opened this issue 1 year ago • 3 comments

We're going to end up with a number of different kinds of data files - both ones that are used in GH Pages/Jekyll builds (as data sources for static web pages) but also within the build and for various tooling.

What are some standards for how to structure data, and where to place data, so that we can avoid Jekyll / Ruby / GH Pages tooling version changes to not break pages builds so frequently?

Today's issue is this: https://github.com/Punderthings/fossfoundation/actions/runs/7931429175/job/21655650634 /opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/3.3.0/psych/parser.rb:62:in _native_parse': (/home/runner/work/fossfoundation/fossfoundation/_data/sponsorships/org-funding.json): did not find expected ',' or '}' while parsing a flow mapping at line 204 column 15 (Psych::SyntaxError)`

But various changes in data files (even unrelated to actual site build) have cropped up regularly in the past.

ShaneCurcuru avatar Feb 16 '24 13:02 ShaneCurcuru

That error could be related to this very strange line in the json file: https://github.com/Punderthings/fossfoundation/blob/main/_data/sponsorships/org-funding.json#L2199

andrew avatar Feb 16 '24 14:02 andrew

Ah-ha! Once I remembered to search-and-remove all occourences, it builds again!

What I don't understand is why neither my VSCode editor nor a linting tool I tried both said the json/yaml was fine, but in the actions build it fails; hence the larger (and future) task of better defining the whole environment, and making it easy to ensure a local dev environments (like mine) match. Also: automated linting on PRs.

ShaneCurcuru avatar Feb 16 '24 15:02 ShaneCurcuru

I was erroring for me when I ran bundle exec jekyll build locally

andrew avatar Feb 16 '24 15:02 andrew