Athons / wiki

💻 Hackathon Wiki - Created by @bahorn
https://hack.athon.uk
MIT License
21 stars 36 forks source link

Adding a proper calendar #17

Open bahorn opened 5 years ago

bahorn commented 5 years ago

I've been investigating some JS libraries for calendars so we don't have to push to the repo every monday to remove stale hackathons.

Currently tried out ToastUI and FullCalendar but it seems mkdocs interferes with the styling.

Beyond that, we would need to actually get our list into the calendar. I'm thinking doing something similar to what mermaid does for the family tree and read the contact contained in a div on the page.

fullcalendar does have support for loading from a JSON feed, but I imagine it's easier if people can just modify the markdown instead.

kkgm13 commented 5 years ago

Just curious since it's taking from Markdown to HTML, has anyone tried what would happen when using the code markdown?

bahorn commented 5 years ago

There are a few libraries for parsing markdown in the browser, but it's probably way easier just to search for a div with a specific id and read the table under it.

wrussell1999 commented 4 years ago

This is something @jedevc might enjoy.

A nice touch would be adding the hackathon logo to the table, similar to the MLH website.

bahorn commented 4 years ago

For the logo it would be worth just adding an extra column to the dataset for this I made a few days ago:

https://gist.github.com/bahorn/bb953987edf0ffd4aed2c69a2988612e

I was thinking a normal calendar, but would make sense to just have them as cards down the page.

wrussell1999 commented 4 years ago

Yeah if we could add an extra column to that, that would be great. I've got a Google Calendar that I add a lot of the hackathons to. If we had something like cssbham.com have with a Google Calendar that shows events on their site. @jedevc built that.

danielfspencer commented 4 years ago

Idea: store the hackathons in YAML structures.

Then for the table we can have a liquid template that traverses the dataset to generate markdown. Then another template can be used to generate JSON for FullCalendar.

I'm can't promise anything soon but I reckon I can make FullCalendar work (I fixed a Jekyll theme that was interfering with it on the HFS site so I imagine this is a similar situation).

robzwolf commented 4 years ago

Agreed, markdown is definitely not the best data structure. YAML, JSON, or something like that would likely be better.

The only advantage I can see from markdown is that it forces people to contribute to the wiki to ensure they have filled out every column (even if it's just a ??). With YAML/JSON, I'd imagine it's more difficult to automatically enforce contributors completing every field. Thoughts @danielfspencer?

danielfspencer commented 4 years ago

Yeah I don't know a way to automatically enforce filling in all the fields unfortunately. YAML/JSON would require more manual review of pull requests.

bahorn commented 4 years ago

Could hackup a github action that runs on each pull request. Enforce this for merges and we're all good.

We did this for CovHack's site to ensure it was linted probably with reviewdog [1], but it just needs to be a python script in a container that checks if has all the fields.

[1] https://github.com/CovHack/CovHack2020/blob/master/.github/workflows/main.yml

danielfspencer commented 4 years ago

Cool! That solves that problem.