-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Disable javascript #11680
Comments
Gatsby is a static site generator based on React. One of it's purposes is to prefetch additional pages. I honestly think that a one-page non-JS site is outside of Gatsby's use-case. For a one-pager, why not use static HTML? |
Yep, maybe that's right. I just discovered gatsby the other day and had to do something simple and test it. Just wondering if that would be possible. I know about other "older" static sites generator, I just wanted to try something new |
We don't support this out of the box, but if you feel advanteruous I think this would doable using |
People build tons of 1 pager sites with Gatsby. Just like larger sites, it's far more productive to use Gatsby with ready-designed development environment and plugins, and optimized production builds vs doing it by hand. Also one page sites rarely stay one page. Also it's rare too for sites to not eventually need JavaScript. Back to the subject of removing the js script tags. It'd be nice if there was a plugin which followed the algorithm @pieh described. It could work for all pages or just specified pages. |
One-Pager are a perfect usecase. I saw so many websites with 30MB of images loading... You get that optimizations for free then |
@pieh thanks, i will take a look at it and try to do something this week. @KyleAMathews yeah, that would be awesome. But i'm getting a grasp of React and this is my first project using gatsby, so I don't think I can do that yet |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m Thanks again for being part of the Gatsby community! |
I wrote a Gatsby plugin that removes Gatsby generated javascript for those that find this issue in the future |
Hi everyone
I have created a single page webpage that doesn't provide any user interaction.
I have all the content in markdown files, and I use gatsby to generate a static, just one page website.
All I need is the html content and the images. Everything is working, but gatsby is adding some javascript files that i wont never use.
How can I avoid that?
The text was updated successfully, but these errors were encountered: