You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
Home > FAQ > Why is my generated static site using project hours?
Why is my generated static site using project hours?
print icon

Since generated static sites need to run build scripts in a full-stack environment, they will consume project hours when the project editor is open and the project is actively being edited. 


To prevent the live site from spending project hours when folks visit it, Glitch uses the following package.json property to make sure the output is detected as static:


 "glitch": {

    "projectType": "generated_static"



This package.json property is included by default in our Glitch In Bio, React and Eleventy generated static site starters. 


If you are importing a generated static site via git or you are working on another type of generated static site that is not a remix of the Glitch starters, then you will need to add the “glitch” property shown above to your generated static site’s package.json



  • The “glitch” property is only needed for generated static sites.

  • When using this property, it should always be entered using the exact same parameters as shown in the code snippet above.  If you change them, then the project editor will ignore it.

  • The Glitch generated static site starters are configured so that the site is served from the build folder. In the starter projects, you won’t see this folder because it is in .gitignore.   If you are working on a generated static site that is not a remix of one of our starters, make sure that  you have a folder named “build” where the  generated content is being saved. Once you create the build folder, you can add it to .gitignore to save disk space.

  • If you would like to  learn more about package.json, check out this npm guide. 

Got more questions? Check out our Community Forum!
Open 24/7, the forum is where Glitch makers help each other and show off all the rad apps that they have created. It's the friendliest community of coders on the Web!
5 out of 6 found this helpful

scroll to top icon