riboseinc / jekyll-theme-open-project

Jekyll theme for site suite presenting your open software and specifications.
MIT License
30 stars 3 forks source link

Project data structure results in brittle iteration over projects/software/specs on hub site #2

Open strogonoff opened 6 years ago

strogonoff commented 6 years ago

In our project data structure, software and specs are located in directories within each project’s directory.

However, Jekyll doesn’t have a concept of subcollections. Jekyll puts under a collection key all files found in that collection’s directory or nested subdirectories.

This means site.projects holds projects, software and specs mixed up. To iterate over just software or specs, we iterate over the whole collection, and on each item we check for URL substring.

Since on project site software and specs become their own collections, this is only an issue on hub site.

We may want a more elegant way of enumerating projects, software and specs, while also keeping it straightforward how to avoid data duplication.

strogonoff commented 6 years ago

Custom Jekyll plugin seems to be the most promising way to build projects from single data source at the moment. Example: https://github.com/codeinpink/jekyll-portfolio-generator.

strogonoff commented 6 years ago

7 improves on how data is stored, but we’d still want to have a better way of parsing that data neatly. For example, in open project site templates we should be able to access an array of docs under site.specs to iterate on specifications, instead of having to iterate over site.projects and weed out ineligible items with inner conditionals.