TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

State of the Web: Static Site Generators

161 pointsby AsyncBananaover 3 years ago

30 comments

WaitWaitWhaover 3 years ago
I am a crusty old (I mean punch card old) &#x27;programmer&#x27;, with multitude of languages under my belt. [theoretical proof that I should be able to do a static site with my one good eye closed.]<p>I love the concept.<p>That said, I do have a bone to pick with the listed generators. They over complicate or fail to explain the site development and the documentation is often a twisted nightmare.<p>It is absolutely true, that if I could get the site generated as I want it, it would be less cost for the server, faster, and so on as described.<p>I really believe that static site generators are lagging in adoption, because unclear documentation.
评论 #30145295 未加载
评论 #30146968 未加载
评论 #30145467 未加载
评论 #30145763 未加载
评论 #30145643 未加载
评论 #30145675 未加载
评论 #30150660 未加载
评论 #30145335 未加载
jeffreyrogersover 3 years ago
My ideal static site generator would have a locally run web app for editing files, styling content, etc. and then would just generate the static assets when you&#x27;re ready to deploy. Not sure if anything like this exists currently or not.<p>Static sites are nice from a deployment perspective, but CMS&#x27;s make a lot of things easier than static site generators do. Seems like there&#x27;s room to have the best of both worlds.
评论 #30144581 未加载
评论 #30145267 未加载
评论 #30145475 未加载
评论 #30144776 未加载
评论 #30148096 未加载
评论 #30145627 未加载
评论 #30145287 未加载
评论 #30144918 未加载
评论 #30145638 未加载
评论 #30144075 未加载
评论 #30150301 未加载
评论 #30145884 未加载
评论 #30147180 未加载
评论 #30144087 未加载
评论 #30148072 未加载
评论 #30145745 未加载
评论 #30148567 未加载
评论 #30146747 未加载
评论 #30144387 未加载
评论 #30144530 未加载
评论 #30144374 未加载
评论 #30144078 未加载
johnfernowover 3 years ago
I love static site generators and I really wish more sites were built with them. There are likely millions of websites that have no login functionality or other functionality that specifically requires a back-end, but use a CMS anyway. Usually a CMS is slower for the users on the site, more expensive for the company running it, less secure, less stable, and more maintenance than a statically generated site.<p>I do think there&#x27;s still plenty of room for improvement for static site generators though. Does anyone have any recommendations for an SSG with easy support for multi-lingual websites? Ideally, I&#x27;d be able to translate the text and provide alternative images, videos, and links without having to change the HTML structure of a given page for each language. Technically, this can be done easily with JavaScript by using a plugin like jQuery Localize [1], but that has two major downsides: (1) all other languages except the default breaks if JavaScript is disabled and (2) users won&#x27;t know that the site supports their language from search engine results (the snippet will be in the default language.) So it&#x27;d be great if I could write the pseudo HTML of a page once, but generate multiple HTML files for each different language (placed into their respective directory, e.g. en&#x2F;, es&#x2F;, fr&#x2F; etc.)<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;coderifous&#x2F;jquery-localize" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;coderifous&#x2F;jquery-localize</a>
评论 #30144442 未加载
评论 #30144214 未加载
评论 #30144185 未加载
AnonHPover 3 years ago
<i>&gt; Static site generators are significantly faster than dynamic websites because they run expensive computations beforehand and compile static files. First, let’s dig deeper into the first point. If you run a website with dynamic software like WordPress, there are multiple steps to send your content to the user.<p>…<p>&gt; These steps take valuable time, and if they take too long, the user could leave before the content loads.<p>…<p>&gt; If you use one of the SSGs that use a JavaScript framework, you are likely sending unnecessary JavaScript to the client. However, partial hydration can solve this. To understand why, let’s first look at what hydration is. Most JavaScript frameworks run code on both the build step and the client. The build step creates the HTML. However, interactivity is still needed. To solve this, they use hydration. Hydration uses client-side JavaScript to make static HTML interactive. Sounds good, right? The problem is that frameworks often send code for parts of the HTML that are not interactive. Doing that slows down page loading without actually changing anything.<p>&gt; The solution is partial hydration, which allows you to define what you want to hydrate.</i><p>So if you started out with performance as a key measure and moved to SSGs (despite the usage being more complex compared to a GUI based CMS), with the JavaScript framework based SSGs (not to be mixed up with simple JavaScript&#x2F;Node based ones) that use&#x2F;prefer client side rendering and hydration you now have poorer performance for a lot more complexity in designing the site and building it.<p>Somehow it feels like the JavaScript framework based SSGs are poorer on many fronts, and seem to give me the impression that they could appear slower to the end user browsing the content (I hate seeing empty placeholders with animations while they wait for the content to be rendered).<p>Just like how it’s easy to spot Electron based apps, it seems easy to spot JavaScript framework based sites too.
评论 #30144453 未加载
评论 #30144447 未加载
评论 #30147246 未加载
评论 #30144254 未加载
open-source-uxover 3 years ago
Static Site Generators (SSG) are not new. The SSG blog software <i>Moveable Type</i> launched in 2001 (written in Perl) and preceded WordPress. It featured a friendly browser-based editing, and a publishing experience suitable for all users.<p>This article omits an important aspect of popular SSGs and the &#x27;Jamstack&#x27;: they are not easy-to-install or easy to use by non-technical users.<p>Some of the most popular SSGs are surprisingly complex despite claims to the contrary. (A simple contact form is impossible in many SSGs without embedding third-party services.)<p>Also, the love of Markdown is not shared by anyone who isn&#x27;t a developer. Step outside of basic Markdown and it becomes unpleasant to use and cumbersome. It&#x27;s even harder for non-technical users - try adding a table using Markdown.<p>Outside of developer circles, SSGs have had neglible impact on non-technical users.
评论 #30145793 未加载
评论 #30148276 未加载
streamofdigitsover 3 years ago
SSG&#x27;s feel like the first step towards something. Unless the website has really simple structure it likely that you will get stuck i) with sub-optimal content management (e.g using an IDE) and ii) a complex mess of mixing code and content, poorly documented and incompatible themes (my experience is with hugo)<p>But those are not arguments to go back to using a database when it is clearly not needed, but rather to evolve tools, documentation, theme design principles etc to eliminate pain points
评论 #30150077 未加载
评论 #30148559 未加载
cblconfederateover 3 years ago
&gt; Not everyone who writes knows how to program too.<p>Aren&#x27;t static generators much harder to grok for nonprogrammers than wordpress?<p>This is a non-problem. The problem is not wordpress. The problem is that modern browser programming, and modern javascript in particular are way more complicated than they need to be for lay people to build their own websites as they did in the good old days. That&#x27;s why everyone moves their communities in discord instead of building a self-hosted forum. We need to be talking about how to make the browser an accessible platform for everyone again (including moms and pops, remember Frontpage?). NOT to keep over-complicating even the smallest tasks and build frameworks that only benefit the BigCorps
benibelaover 3 years ago
I use XQuery as static site generator. It is a w3c standard.<p>You just write the HTML and then it replaces $variables with data, e.g.:<p><pre><code> &lt;html&gt;&lt;head&gt; &lt;title&gt;{$title}&lt;&#x2F;title&gt; &lt;&#x2F;head&gt;&lt;body&gt; &lt;h1&gt;{$title}&lt;&#x2F;h1&gt; &lt;div class=&quot;main&quot;&gt;{$content}&lt;&#x2F;div&gt; ... </code></pre> It has for loops and functions, too
评论 #30151624 未加载
hellweaver666over 3 years ago
I&#x27;m currently in the process of moving my simple blog away from Ghost (formally WordPress) into a static HTML site. I can write HTML with my eyes closed and it&#x27;s barely more inconvenient than Markdown, only I don&#x27;t need some parser in the middle to complicate things. The most painful part of this is rewriting my content and moving the images etc across but it&#x27;s more mundane than anything. Only dynamic part of the site is some simple includes for the header and footer. This is the way I used to run my site back in 1998 and it&#x27;s far less troublesome. No security updates to worry about, no plugins, just straight up content.
simonjgreenover 3 years ago
Static site generation definitely predates Jekyl. If anything I think Jekyl would be better flagged in the timeline as the beginning of a renaissance for static site generation. I can think of two eras when it was in vogue before that<p>To give an example, my team was doing this in the early 00&#x27;s on some major brand websites to eek performance out of stacks originally built on either PHP or Perl with MySQL Cluster (as in NDB) as the backend.<p>We fired crawlers both on article creation and periodically overnight that browsed the dynamic site dumping out to a static &quot;cache&quot;. Initially this was html chunks which was bolted together by Apache SSI includes. (eg header, footer, menu, content, and a wrapper). Later that evolved in to storing in Memcached with a simple Memcached implementation frontend wrapper to cache on demand.<p>If I wind my memory back even further to late 90s early 00s I remember pre-Web2 tools that would give you a local desktop based CMS and site generator that pumped out flat files and pushed over FTP. These were especially commonly used by graphic designers making the transition from print design to web for things like brochure sites.
评论 #30146780 未加载
评论 #30146900 未加载
declnzover 3 years ago
Love SSGs too! Came here to share praise for Hakyll[1], for people with an FP leaning.<p>Predictably, it&#x27;s not easy to get started, but once you&#x27;re into it the power of building your own arbitrary content &quot;compilers&quot; (and template extensions etc etc) is pretty impressive.<p>[1] <a href="https:&#x2F;&#x2F;jaspervdj.be&#x2F;hakyll&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jaspervdj.be&#x2F;hakyll&#x2F;</a>
dgudkovover 3 years ago
My experience with SSGs was a mixed bag. I like the concept, but integrating with a headless CMS requires too much coding and simple things like page preview is a pain to setup and use. The existing headless CMSs leave a lot to desire in terms of usability (although, Strapi is not bad).<p>Static site generation should be simpler. Currently it&#x27;s over-engineered.
aidogover 3 years ago
I&#x27;ve made a simple php solution with markdown and blade templating. Newest post with two images fully loads in 1.88 seconds in Germany without a CDN running on 5$ linode in Tokyo. No build steps and I just write .md files in the git repo. Static Site Generators are nice, but using fewer parts is also an option.
评论 #30145077 未加载
dv35zover 3 years ago
What would you recommend for a GUI interface to authoring a site based on Hugo<p>I put together a Hugo site, where the site is automatically deployed to Render (similar to Heroku) whenever a commit is made to the GitLab repo.<p>While I am &quot;ok&quot; using Obsidian + WorkingCopy (iOS git client) on my phone to update the site - its clunky but works- is not acceptable to less-technical people.<p>I want the benefits of a site based on plaintext Markdown, but want something that approaches the ease of jamming out a doc on Google Docs, Notion etc, dropping images into the content, etc.<p>Suggestions to check out?
kuonover 3 years ago
I now use Zola with esbuild + postcss + tailwind, and with the new JIT tailwind, I got cold (not counting npm install) build under 500ms for large sites.<p>I run multitail with one watcher running zola server and the other one running esbuild.<p>It is the first time since a long long time that I have a js&#x2F;css build system that is not impossibly complicated to grasp. I do use a few postcss plugins, but all with default configuration (except tailwind). I did them all, grunt, gulp, bower, webpack... always a nightmare.
rammy1234over 3 years ago
Found this - SSG - <a href="https:&#x2F;&#x2F;staticfire.site" rel="nofollow">https:&#x2F;&#x2F;staticfire.site</a>. More specifically this - <a href="https:&#x2F;&#x2F;staticfire.site&#x2F;content&#x2F;static_site&#x2F;" rel="nofollow">https:&#x2F;&#x2F;staticfire.site&#x2F;content&#x2F;static_site&#x2F;</a>
taurusnoisesover 3 years ago
I so wish I was code savvy enough to build a simple blog site on Hugo or one of the other SSGs. (sigh)
评论 #30144302 未加载
评论 #30143841 未加载
评论 #30143878 未加载
评论 #30144011 未加载
评论 #30144272 未加载
评论 #30144082 未加载
评论 #30143969 未加载
评论 #30143861 未加载
miki_tylerover 3 years ago
Nice article. WordPress and most of CLI solutions are covered well.<p>I missed though a bit on apps and alternative site generators like Lektor, Pinegrow and our app, Kit55 (<a href="https:&#x2F;&#x2F;stack55.com" rel="nofollow">https:&#x2F;&#x2F;stack55.com</a>).
评论 #30143786 未加载
indigodaddyover 3 years ago
Hey guys, anyone know if there is any server&#x2F;webserver that can actually serve raw markdown files as html? I think Harp can do it but I was just wondering if there is anything else. Thanks.
评论 #30144866 未加载
评论 #30145321 未加载
评论 #30144780 未加载
harryvederciover 3 years ago
If you know how to code, writing your own basic Static Site Generator can be a fun side project that shouldn&#x27;t take too much time.<p>Bonus points if you auto-generate an RSS feed!
评论 #30146349 未加载
buro9over 3 years ago
My ideal is a static site generator that has markdown as the input, a couple of data connectors (to things like Google sheets), and that can be &quot;hosted&quot; in GitHub. On commit, a Github Action would generate the static content.<p>We&#x27;re close to that I think. Something like Hugo may already be there.<p>For the vast majority of WordPress or small business portfolio websites (beauty, building, etc) this would be perfect.
评论 #30145626 未加载
评论 #30145610 未加载
zestyrxover 3 years ago
Funny, I wrote about this recently as well.<p>I&#x27;m a huge fan of SSG but concerned about the impact that it has on SEO and search engine quality.<p><a href="https:&#x2F;&#x2F;zestyrx.com&#x2F;blog&#x2F;nextjs-ssg" rel="nofollow">https:&#x2F;&#x2F;zestyrx.com&#x2F;blog&#x2F;nextjs-ssg</a>
j-kriegerover 3 years ago
I‘m going to make a case for one of the more complicated SSG setups.<p>My current domain is a full blown Next.js setup hosted at Netlify. I use Next.js because I use React in my day job and frankly, I enjoy it. Out of Next I get: partial hydration, automatic image optimization, a no-bullshit build setup, static pages where I need them and the ability to add complex things like Markdown and LaTeX support or interactive graphs for more involved blog post. The real winner is MDX. Where I had to resolve to cheap tricks like shortcodes before, I can just import and place my graph components.<p>By using the Netlify free tier, my site gains free SSL and builds automatically when I push to master.<p>You would think this is insanely heavyweight for a basic homepage, but it’s not. Once setup, I can just write my blog in markdown. My entire site ships at just a bit over 50KB gzipped.<p>Do you <i>need</i> this setup? No. But I had fun doing it.
评论 #30144155 未加载
Zababaover 3 years ago
&gt; Hugo is usually around 6 times faster than Jekyll and is even faster compared to Next.js or other framework-based SSGs.<p>Just 6 times? That sounds not much for a rewrite from Ruby to Go. Is this one of those things that&#x27;s mostly IO-bound?
pointlessoneover 3 years ago
For those who might want to explore SSG themselves here&#x27;s a great directory: <a href="https:&#x2F;&#x2F;jamstack.org&#x2F;generators&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jamstack.org&#x2F;generators&#x2F;</a>
jbergensover 3 years ago
I just skimmed the article. Was 11ty ever mentioned? That looks to me like one of the easiest to start with and it has some pretty advanced features also.
zuhayeerover 3 years ago
Huge fan of statically generated pages. We statically generate all our pages at Levels.fyi. Another benefit is that static websites are also great for SEO. Cool to see a lot more adoption and progress around the tech here. For example, once you reach tens of thousands of generated pages it can get a bit hard to maintain, but tools such as Next&#x27;s incremental static regeneration make things a bit easier: <a href="https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;basic-features&#x2F;data-fetching&#x2F;incremental-static-regeneration" rel="nofollow">https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;basic-features&#x2F;data-fetching&#x2F;increme...</a>
jay_kyburzover 3 years ago
Anybody remember CityDesk.
评论 #30145402 未加载
mshover 3 years ago
Sometimes i miss the simple elegance of tools like city desk.
nathiasover 3 years ago
missing eleventy