-
Notifications
You must be signed in to change notification settings - Fork 15
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
Move to use of a Static Site Generator #98
Comments
Hi Jamie, interesting idea - are you thinking of a site generated from some config, where a new event would just be added to a config file, and the site regenerated? |
Sounds like an interesting idea to have the site generated at regular intervals, we need to have it regenerate though in my opinion as soon as possible (so regeneration timescales need careful consideration) after a new meet up event is published to ensure it comes out on Nottingham Digital as soon as possible. There is recent changes to the meetup api we probably need to consider, whilst the api was recently refactored by @pavlakis and there is now Oauth2 auth it is not running on a server flow with user creds cos it requires a pro user - I don't think that is a great issue but worth highlighting. Is easier on-boarding and content generation something we may be able to achieve using github actions ? I am aware of https://github.com/peaceiris/actions-hugo for example |
I like the idea of GitHub actions - no server to maintain, just come action to rebuild the index page when new commits are made, e.g. when there's an addition of a new event to a config file. Also, could potentially use actions to recreate the sort order at intervals (could be a time-based action, https://help.github.com/en/articles/events-that-trigger-workflows#scheduled-events-schedule) - maybe a sort order file which could be used to sort the index page items without further requests to the server..? |
Sorry for the late reply.
My main thought is to convert it to a static site generator, such as Jekyll or Hugo, which as Julian says, will give us the ability to create a file i.e: # content/events/tech-nottingham.md
---
theme: tech
title: Tech Nottingham
urls:
event: https://www.technottingham.com/
twitter: https://twitter.com/technottingham
description: Making Nottingham a better place to live & work in technology - meetups & events, community building, advocacy and education.
when: Second Monday
--- This would allow each file to be theme in-dependent, whereas currently if we need to make a change to i.e. the CSS class that defines the title, we have a tonne of changes to make. It also allows us to make it easier to add more information more easily, as well as looking at generating other formats In terms of rebuilding the site on i.e. Pull Request, we can do that fairly easily with GitHub Actions, Netlify, or plain ol' GitHub Pages. Having a admin interface for the repo could be done with a static site generator too, there are various static site Content Managment Systems i.e. Netlify CMS (which doesn't require using Netlify).
That's a good shout re the OAuth2 conversion - it should be OK to authorize as yourself (or not even require authorization) @pavlakis I'm happy to chat about this offline, as I recently wrote an API for Meetup.com which works with anonymous API requests. |
@jamietanna This looks good and will definitely reduce the number of moving parts. In terms of the current setup, I'm using this API Gateway to pull each event from Meetup, and make it available on the page. |
I'm looking to contribute this during this upcoming Hacktoberfest |
Are we happy if I start with a move to Hugo? Maybe using GitHub Actions to publish it to GitHub Pages? |
Definately put in a PR I say - in terms of the API how would your proposal work with that ? |
We currently hit the API client side don't we? I'd say continue to do that, otherwise we need to keep rebuilding the site |
Cool ok then I have updated the js versions - may look at rebuilding the build system there @jamietanna let me know when you have a branch happy to help out - see #111 |
Yes, I'm happy if you want to move the site to be statically generated using Hugo etc. I still think the client-side sorting is the least satisfactory bit of the site - the user experience is pretty sketchy, and the api gets called more than is necessary. We really only need to re-order the events a couple of times - when the date rolls over, and when new events are added. Is there a way that we could use actions to do that? Having said that, we'll be no worse off if the (statically generated) site still does client-side sorting.. |
As part of nottinghamdigital#98, we decided that we wanted to replace the single HTML file with a static site generator. This allows for easier adding/changing of content and theme, as currently the setup of the site will make it a little difficult to change the structure of the site in the future, and it also makes it easier for folks to contribute changes to the events on the site. We've decided to use Hugo, as a lightweight solution that only requires a single download to get it working. To make this work and automagically deploy on merges, we need to use GitHub Actions. We no longer need anything Gulp/Node related, as Hugo can minify our source for us, so we can remove those references. Closes nottinghamdigital#98.
Something I've been meaning to ask for a while - would we like to move this to use a static site generator which may make it easier to onboard new events?
The text was updated successfully, but these errors were encountered: