Canonical URL: https://www.swyx.io/writing/svelte-community-fixup/
One of my longstanding projects that I'm always feeling guilty about not spending time on is the Svelte Community site.
At it's surface it is just a simple static site with searchable links to resources, but the vision is that this would hold all the stuff that the official docs and chat would not be able to hold.
Obviously the Svelte maintainers are stretched thin, and I'm just one (busy) guy, so you're welcome to swim on in to contribute if you want to help grow the Svelte community!
I took a couple hours to update it today and here are my public notes from what I did.
Updating the ssg
dependency
https://github.com/sveltejs/community/blob/master/package.json#L15
I have been bumping up the ssg version as I tweak features and fix bugs, so just keeping this up to par. I anticipate biting the bullet to move off of Sapper sooner rather than later given I am now consistently running into scaling issues with it on my own site.
Updating the data and data fetching scripts
https://github.com/sveltejs/community/commit/efc0953c5bc399b985d4d75ec9ca21bcb4ef094f
We scrape GitHub stars and npm downloads to give a little indication of the maintenance and adoption status of the ecosystem, this needed to be done on a more regular basis but was written just for a onetime run, so I just ran it once.
Automating Data Scraping with GitHub Actions
I previously wrote about this so I assumed this would be easy, but boy I wasted an hour going nuts with the unintuitive GitHub Actions UI:
This was because this is what happens when you add a valid GitHub Action:
That's right, absolutely no recognition at all from GH Actions that you did something right. Ugh. Took me an hour to verify that nothing went wrong, the GH Actions syntax didnt change, I wasn't going crazy.
The other thing I found out was that you can't add an environment variable prefixed with GITHUB_
as that is a reserved env var. Understandable, but the docs say setting an environment variable or secret with the GITHUB_
prefix will result in an error and there was most certainly no error.
Work, Work
Anyway, the fixup is done, at the cost of some hair pulling from the GH Actions debacle. There is no manual trigger (some hacks here and you can create a custom webhook event if you really need to but ugh) so the only way to tell if this thing will work is to... wait.
The remaining work to do on the Svelte Community Site is:
- Add everything in Discord over the last few months
- Make events easier to signup for and notify - wire it to a Google Sheet
- Make the Showcase more impressive
- Start writing Recipes
- Look at the Vue folks for more ideas.
Once again, if you'd like to help, you're welcome to join us!