UPDATE! - May 13, 2021 - Glitch has made it of­fi­cial by pub­lish­ing de­tails of the new fea­tures on their blog (my Vue starter pro­ject was even men­tioned in that post!), you can read it here.

It’s 30th March, 2021, and I am about to sleep.

PING, PING

I take a look at my phone.

There’s a new email in my in­box, with the ti­tle, Preview a part of the new Glitch & tell us what you think!”

I think I got this fea­ture pre­view email from Glitch be­cause I had signed up for such emails when they were about to re­lease boosted pro­jects (Glitch pro­jects with ex­tra disk space, CPU and cool fea­tures, see https://​glitch.com/​pric­ing). Anyway, Glitch was launch­ing a re­fresh of our Create Project” menu apps of­fer­ings.” So for those who are un­aware, Glitch had 3 starter pro­jects from which all pro­jects started. It’s kinda ob­vi­ous from the name, starter pro­jects”.

For long, they’ve been the base of every Glitch pro­jects, ex­cept for those di­rectly im­ported from Git. They still are. But Glitch de­cided to lis­ten to what the com­mu­nity had to say, and de­cided to cre­ate 3 more starter pro­jects that were to­tally needed.

Now, there are a lot of re­ally good com­mu­nity-made starter tem­plates that work per­fectly, it is­n’t that hard to add meta tags and set up React, and this email was about to go to Gmail Trash Central (it’s an empty and scary place) when some­thing caught my eye. Notice how two of the three new starter pro­jects have the phrase generated sta­tic site”? I was ec­sta­tic.

ec­sta­tic

/ɪkˈstatɪk,ɛkˈstatɪk/

ad­jec­tive

  1. feel­ing or ex­press­ing over­whelm­ing hap­pi­ness or joy­ful ex­cite­ment.

Ok, so the thing is Glitch in­tro­duced sta­tic sites a few months back, where if your site does not have a package.json, glitch.json or a requirements.txt, it will be con­sid­ered a sta­tic site, mean­ing it won’t count to­wards your Project Hours. But that is­n’t en­tirely fair, be­cause frame­works like Vue and React have a package.json while in de­vel­op­ment mode, but af­ter every­thing is done, you end up with a sta­tic site with sta­tic files with­out a package.json. While it is­n’t im­pos­si­ble to set up a work­flow where you can switch be­tween pro­duc­tion and de­vel­op­ment/​a sta­tic site and a dy­namic site/​no pack­age.json and pack­age.json, it is re­ally tough. I’ve tried it be­fore, and hon­estly, it’s not worth it. The process is slow, in­ef­fi­cient and time con­sum­ing.

SO I SENT AN EMAIL. I love emails. It feels pro­fes­sional. Although I al­ways in­sert lame jokes or puns when­ever I write emails to the awe­some folks at Glitch.

Hi Glitch,

The new fea­ture, where sta­tic sites are on­line 24/7 is re­ally awe­some!

But clas­si­fy­ing a pro­ject as sta­tic or dy­namic based on the ex­is­tence of a pack­age.json or glitch.json is kinda un­fair be­cause frame­works like Vue and React re­sult in sta­tic web­sites, and so tech­ni­cally, they are sta­tic sites. But they also re­quire a pack­age.json for build­ing files and for de­pen­dences and hence, on Glitch, they be­come clas­si­fied as non-sta­tic pro­jects. I know its hard to iden­tify if a pro­ject is a Vue or React ap­pli­ca­tion, but maybe you could look for cer­tain de­pen­den­cies in­stalled like the Vue pack­age or the React pack­age. For ref­er­ence, this iden­ti­fy­ing has been done by other ser­vices like Netlify and Vercel based on your pack­age.json.

This is a fea­ture I would like to see in the fu­ture! And keep be­ing an awe­some plat­form for de­vel­op­ers!

Have a great day,
Khaleel Gibran

Some emo­jis were lost while copy-past­ing. Let’s have a mo­ment of si­lence for the lost emo­jis.

And I waited and I waited and I waited and I waited. Actually, I did­n’t have to wait that long, they replied the next day! Hooray! And then they said:

Thanks for the sug­ges­tion! I am go­ing to pass this along to the team who worked on the sta­tic sites pro­ject to see if this can be im­ple­mented. I’m not sure when they will be able to take a look, but as soon as I get a re­sponse from them, I will let you know!

And I waited. And the next day:

Our Product team was happy that you brought this up be­cause it is some­thing that they have been dis­cussing lately.

Here is an up­date from them to you:
As you pointed out, we do have a strict de­f­i­n­i­tion of sta­tic sites right now that does­n’t in­clude any­thing that needs to be built or com­piled first, and we make that de­ter­mi­na­tion based on files pre­sent. However, we are think­ing about how to sup­port pro­jects that re­sult in sta­tic sites af­ter be­ing built. It does­n’t share the same ar­chi­tec­ture for us on the back­end so it was­n’t the first step we took when launch­ing sta­tic sites, but it’s re­ally use­ful to see that users like your­self are in­ter­ested in it!

I hope this info helps you! If I get ad­di­tional in­for­ma­tion about im­prove­ments we are mak­ing to sta­tic sites, I’ll let you know!

This was good news! I knew that it was go­ing to take some time for the Glitch team to im­ple­ment this fea­ture be­cause they had just launched the whole Project Hours/static vs dy­namic site con­cept.

And months later, it hap­pened!

If you have any more ques­tions, you should prob­a­bly ask here.

Thanks to jenn for the clar­i­fi­ca­tion on many as­pects of this new fea­ture!