-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add past events to the website #40
Conversation
A simple page, created at build time, which inspects the contents of public/past and generates a page with a link to each. Also, add a link to that newly created page to the footer.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
(note that the Past Events page could do with attention from a designer of some kind, which is not me. But that probably isn't a blocker.) |
I get this locally when trying to run
The |
Huh, I hadn't noticed the logo images, good catch @Waterdrips. The issue there is that the images are bundled into the folder (https://conf-techmids-io-git-fork-stuartlangridge-main-tech-mids.vercel.app/past/2022-10/fusion-events.png exists, for example), but that the img link in the page wasn't updated to make it a relative link when |
… about wha the actual problem was.
Well, that's not supposed to happen (just like it says :)) Sorry about that @mattandrews -- I don't know what's causing the problem, but I have at least poked the script to relate what the error actually is when that happens so at least we can see what's up. Can you run it again? |
Done! Got this:
|
You may be able to specify a base path on build? |
@mattandrews what? how can that not work? What does |
Same thing: I'm on Mac in case that adds anything... |
... |
I do specify a base path on build :-) Most of the links to things do indeed get patched up, but those image links don't. I don't know why; someone who knows more about next.js may do. However, the advantage with dumping the sites to static is that we don't actually have to work this out immediately; it's OK to patch up the static HTML to make it work like I did, because then it stays fixed. A patch to make next.js better about fixing up such image links in the future when it exports to static would be a useful thing for someone to work on at some point if it becomes annoying, though. It looks like the image links are fixed in the vercel preview now, anyway, as expected, so that's good. |
weird, I don't get why it still works here, since it seems to have been dropped yonks ago. Anyway, PR updated to get the stuff from just |
Export directory exists and I just made it 777 (and tried running the script as sudo), same error... sorry! (LOVED the ascii art!) |
...for the same reason. I have, this time, checked that there's nowhere else I'm using fs.constants too :) |
It did things for a while, then:
|
Ok, sigh. I know what that is and I know how to fix it, but I'll have to come back to it in a bit. This is my fault for not properly testing exports after I built the Past Events page, which needs to be cleverer than it currently is. (The problem is that a static export should not, itself, contain other past exports). |
Haha thanks for all the effort, I can see how much work's gone into this. Thank you! |
https://conf-techmids-maxlckqug-tech-mids.vercel.app/past/2022-10/speakers/mark-perkin.html each user page has a set of sponsors too. We can probably get away with merging this and fixing up if it becomes an issue later? |
The past-events page automatically discovers all past events, and now decorates them with the metadata found in PastEventsList. This means that when a new past event is added with link-to-the-past, it will automatically appear on the past-events page with default metadata, and can then be given its own nice picture and the like when desired by editing PastEventsList. This is relevant to an issue brought up by @mattandrews in PR techmids#40.
This PR adds past versions of the conf.techmids.io website to the current website, so that people can get access to the pages for past events to see who spoke at them, what they spoke about, and so on. Most conferences have this, and it's a very useful historical record. The goal here is that making sure that past versions of the conference are made available with close to zero burden on the website maintainers. The PR comes in three parts.
Part 1
(The two "add past version of website" commits)
The websites for the October 2022 and June 2023 events. These websites are pure static HTML with no outside dependencies and no build process; each is an independent folder of static HTML/CSS/JS stored in
public/past
. This is done so that they are self-contained; changes to the build process of the current website will not affect these past websites at all, because they've already been built to static HTML; they are not rebuilt on each change. This means that changing the version of next.js (or changing away from next.js entirely) and the like will not stop these past versions from working.Part 2
(The "link-to-the-past" commit)
A script which generates these static versions of the website, which is called
link-to-the-past
. It is documented in detail inlink-to-the-past/README.md
, but the basic idea is this: there will be a day when the October 2023 event (for example) is over and you want to start changing the website for a 2024 event. On that day, before you make any changes to refer to the 2024 website, runnpm run link-to-the-past 2023-10
. This will bundle up the website as it currently looks into a static version of itself atpast/2023-10
. Then go ahead and make whatever changes are deemed necessary. This script is all inside thelink-to-the-past
folder, and is pure command-line nodejs; it doesn't run servers or anything like that, and you only run it once to create the static version, not every time.Part 3
(The "Simple past-events page" commit)
A
/past-events
page on the website itself, linked from the footer. This page is built at build-time and adds a simple link to each of the past events by inspecting the filesystem. This is next.js stuff, and it is entirely possible that someone more expert with next.js itself could do this a more efficient or elegant way, and if that person exists and has the time then I would be happy to have them do this instead.