3 ms·
The major issue is HTML has no way for you to share chunks of HTML between pages e.g. a header or footer, so you'll have to copy/paste chunks manually (unlike w
by seanwilson 6y ago
The major issue is HTML has no way for you to share chunks of HTML between pages e.g. a header or footer, so you'll have to copy/paste chunks manually (unlike with CSS, images and JavaScript though which you can embed on multiple pages).
I can recommend Hugo if all you need is the above (and more). It's a single binary to install/run, runs super fast and you only need to learn a couple of template tags for the above.
I'm not keen on Gatsby or Jekyll because they're an order of magnitude slower as far as I know and require you to have a pile of Node and Ruby (respectively) dependencies set up which is an extra headache and stuff that can break.
Every now and then my site that uses Jekyll will break when I push to Netlify because something changed somewhere and it's a massive drag (I know proper containerisation would solve this but this is extra work and expertise required). Hugo is really simple in contrast because you don't have any dependencies to isolate or require a complex build script.
- dylz 6y agoSome people will tell you about frames and framesets
- seanwilson 6y agoThey're really impractical for this use though as they don't act the same way as HTML being inlined into your page e.g. the elements inside the iframe won't influence the size of the iframe making responsive layout a pain, CSS on the parent page won't act on the HTML inside the iframe, sharing state via JavaScript is more complex. Pages that have e.g. contact forms that are really iframes tend to stand out a mile for example.
- leejoramo 6y agoSome people will tell you about Server Side Includes SSI
- perilunar 6y agoThere are various ways to do client-side includes, but they mostly rely on JS to load and insert the HTML fragments. Simple enough if you just want to include a few common elements and don't want a build step. Not so good if you want actual templating.