Generate static site (html + js + css)? #254
-
The example seems to assume we want to run Deno on server side. Is it possible to generate static site which can be for instance deployed to github pages? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Not easily, no. You could write your main fresh app and then create a secondary program that scrapes your main app during a build process and emits static files. I haven't tried this, but it should work. Mandatory shilling: have you tried hosting your fresh app on Deno Deploy? It's free for most projects :) |
Beta Was this translation helpful? Give feedback.
-
One significant downside of no SSG in Fresh is that it makes it far less compatible with @tauri-apps for easy creation of desktop apps. From their Discord:
|
Beta Was this translation helpful? Give feedback.
-
I am integrating Lume to work alongside fresh (link to repo). Here is how it is designed to be working so far. Keen for suggestions on improvements. |
Beta Was this translation helpful? Give feedback.
-
this might help to build a static website coding in html + js/ts with https://github.com/mindon/packup |
Beta Was this translation helpful? Give feedback.
-
jamstack.org lists 335 different frameworks you can use to make static sites. IMO the whole advantage of Fresh is that it allows you to generate server pages dynamically (like Rails), and also provide the minimum amount of JS for interactivity (like jQuery) in an expression space you can make sense of (like React). |
Beta Was this translation helpful? Give feedback.
Not easily, no. You could write your main fresh app and then create a secondary program that scrapes your main app during a build process and emits static files. I haven't tried this, but it should work.
Mandatory shilling: have you tried hosting your fresh app on Deno Deploy? It's free for most projects :)