Updating to Glitch in Bio 1.0 (finally); observations

Hey all! I’ve eventually (!!) gotten around to moving my main glitch-in-bio site over to the newer 1.0 version of the template.

I mostly love my existing site that was built on the original framework… in retrospect I don’t like the colour scheme I came up with, but I’m working on that now.

The advice when the v1.0 version came out was to do a manual upgrade to move over any customisations, and that’s the approach I’m taking. Here’s my newer version. I had to do a bit of thinking to understand how 1.0 differs from the original version, and where the different customisations and elements live in the new world.

In moving up to Vite 4.x I’ve got a couple of frustrations:

  • I don’t mind the way that the templated sections are divided up into JS files rather than being handlebars templates, but I don’t love that these are now essentially spitting out long strings of HTML that get rendered up into the final index.html file. It also means that the Glitch editor cannot help with things like pretty formatting, since it’s a JavaScript file but we’re editing HTML inside a string literal.

  • Almost all of the rendering and loading is happening on the client side. The app sends a tiny index.html file, with a big JS file that gets run on the browser to insert all of the “chunks” of the page. The outcome is that it loads in a very jerky manner, particularly because we’re setting a theme value in settings, which is only interpreted after the page initially loads in the browser, so the stylesheet gets loaded late.

I’ve had a look into trying to convert this into doing server-side rendering, but that seems to want a node.js server, which then means we would lose the option of having an always-on static site (I do have paid plan but already have my allocation of boosted apps).

Anyway, just some observations - in general, still pretty happy with Glitch in Bio! I found a few small bugs which I’ll try to fix in a clean remix of the template at some point… right now I’m off to add yet another load of new social icons to my copy.

My final challenge is going to be moving this over into my existing project, which I want to do because it has a working custom domain that I want to re-use.

5 Likes

Relatedly: I’m also interested in how we (the community) can work together to maintain the Glitch in Bio template app, and also, make it more IndieWeb friendly. Let me know if anyone has thoughts on this!

2 Likes

Thanks for sharing this - and it’s a great question. Right now our starters do have repos on Github but they are all staff-only, but I think Glitch in Bio would be a good one to open up to the community. I just need to see if it’s okay for me to go ahead and do that and also make sure the community is set up for success on contributing.

So my question to folks here is: what would you need from Glitch to enable you to contribute to Glitch in Bio.

  • Open repo for posting issues, making PRs
  • Contributor guide (how to set up locally, how to make PRs, feature request list, what’s not in scope for GiB - anything else I’m missing?)
  • Code of Conduct (we’ve already done this work for the Fastly open source side but need to codify it within this repo)
    1. what else?
4 Likes

I think that’s the basic list of needs there - repo for issues and PRs, how to contribute including scoping, and CoC. It may also be a good idea to include something to help with expectations around acceptance of PRs in the contribution guide, as I know you all get busy and may not have time to constantly respond to those kinds of things; maybe a goal of monthly or two-monthly cadence for issues and PRs to be reviewed, or something like that?

3 Likes

This could also be a great way to enable folks to share themes! OK, now I’m getting excited…

I don’t think much is needed. Maybe just a nice readme, all the things you’ve mentioned, and you’re probably done.

1 Like

OK! I’ve flipped the switch… aka, moved the new GiB over to my custom domain.

I ended up doing it this way:

  • synced a final copy of my old GiB site to GitHub
  • renamed the glitch branch on GitHub to glitch-v0
  • rm -rf * in my original project
  • git clone [url to my new project private git repo] in my original project
  • move the files up to the top level of my original project and clean up
  • make sure everything seems (!) to be working with the new version
  • sync the new version to GitHub on a new glitch branch

Bit hacky, but I’ve got Glitch in Bio v1.0 with my own adaptations and fixes on my custom domain. Let me know what you think! :slight_smile:

… ah, almost immediately hit an issue - the OpenGraph tags in the default setup are added in a render block that happens on the client-side. Really need to figure out how to get this fully rendering on server side, I think. I’ve hacked it by moving the og tags into index.html, but that’s not very configurable or flexible.

does SSR make the Glitch project a Node.js project or a generated static site?

server side rendering requires a server - static site generation isn’t quite the same thing

that’s what I thought, won’t that make Glitch in Bios run on Project Hours and take a bit of time to startup?

Not necessarily. There could be a build process that does the rendering and outputs static pages. I started to play with this but haven’t quite ironed it out yet.

It’s still working great, BTW - I’m just exploring ways to make it better! I got the opengraph piece to work by moving it into the index.html file for my own site.