Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drive various event activity from data file #32

Open
nickebbitt opened this issue Nov 30, 2021 · 4 comments
Open

Drive various event activity from data file #32

nickebbitt opened this issue Nov 30, 2021 · 4 comments
Labels
enhancement New feature or request
Projects

Comments

@nickebbitt
Copy link
Collaborator

nickebbitt commented Nov 30, 2021

I was thinking it would be nice if we could add some config to a file that described an event e.g.

events:
  - title: My Event
    date: 01/12/2021
    description: Lots of useful info
.
.
.
etc.

We could then use this to drive the Event page of the website but we could also use it to:

This might be something we can automate using GitHub actions

@CraigAMcDonald
Copy link
Contributor

I've had a similar idea but it was really just a poor replacement for a database. I had only been thinking in terms of the website though, probably a JSON file that can be loaded? Not sure if there is an existing JS library that does it or if JBake can help with this.

@nickebbitt
Copy link
Collaborator Author

I'd argue that a document is a good starting point before you need a database.

A database adds lots of complexity whereas a static JSON/YAML document provides your data model without the the additional concerns. In the main I can see the data being pretty static in nature so value of a database initially feels minimal.

@jonbullock can maybe comment on how/if we can load a structured data file and reference it during the static site generation

@nickebbitt nickebbitt added the enhancement New feature or request label Nov 30, 2021
@nickebbitt nickebbitt added this to To do in Website Nov 30, 2021
@jonbullock
Copy link
Member

Yeah JBake supports data files in YAML format (JSON support shouldn't be that much work to support). The contents is parsed, saved into the content store and exposed to the template engines. It's quite a recent addition and used on the optaplanner.org website to list events.

@jonbullock
Copy link
Member

Don't see a reason why the same file can't be used for both the web site and some GitHub Actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Website
To do
Development

No branches or pull requests

3 participants