Punderthings / fossfoundation

Directory of non-profit FOSS Foundations, with detailed metadata.
https://fossfoundation.info/
Apache License 2.0
19 stars 13 forks source link

Improve site builds and define data file standards #19

Open ShaneCurcuru opened 6 months ago

ShaneCurcuru commented 6 months ago

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.

andrew commented 6 months ago

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

ShaneCurcuru commented 6 months ago

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.

andrew commented 6 months ago

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