DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

1 1

Looking for no framework, no "library" static site generator, with API data source, or should I go for SSR?

As for "library", yes, I am talking about that extra big library, React, as well as Gatsby and Next.js.

Hugo doesn't seem to support REST API, nor GraphQL data sources, yet. Indeed, I did learnt about how to structure folders from Hugo.

I do plan to include at least one API-rendered page, anyway; but I see that it is easily created by <template> tag + some basic JavaScript.

Or, maybe I should try Express.js + Template engine + wget?

wget -m http://localhost:$PORT
Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
webbureaucrat profile image
webbureaucrat

Have you tried Eleventy? It's very pluggable. Without knowing your use case, I think you could do what you needed by defining an Eleventy custom filter (a javascript function defined in the .eleventy.js that you can call from your static page that will fire at compile time).

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

I completely forgot about *.eleventy.js; so yes, it is possible.

However, I don't think *.eleventy.js natively support @babel/node (Babel) or ts-node (TypeScript), so it will make life a little harder for me.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay