top | item 41775526

(no title)

dhotson | 1 year ago

Most people's expectations of what a "basic website" should do have gone way up over time.

Even as a programmer, I've fallen into the static site generator trap a few times.

It's annoying to start a side project with a static site generator and then realise I want to add a small feature and suddenly I wish I'd just started with a simple Rails or PHP app.

Nowadays, if I want a static site I just start with a folder of html files. It's way less complicated and quicker to go from idea -> execution without bike-shedding or procrastination on tools.

I'm pretty happy writing html and css manually though—I don't recommend it for everyone.

The other cool thing is if I then decide to "abort" to rails.. I can copy the folder of html files into the rails public/ folder.. pretty easy upgrade path.

discuss

order

Calavar|1 year ago

Maybe you just haven't found the right static site generator for your needs?

Jekyll is the most well known in Ruby space, but it's tailored to a specific niche - authoring a blog with Markdown or another lightweight markup language. You can certainly massage it into doing other things, but it's not that ergonomic as a general purpose static site generator.

If you want something that's easy to copy/paste into rails, a rack based static site generator like middleman is great because you can start writing with erb/haml and ActiveSupport from the very beginning.

If you're looking for the simplicity of handwriting HTML and CSS but you want some niceties like includes, partial templates, link helpers, nanoc is a good static site generator that's progressive. Start with plain HTML/CSS, only add additional features as you need them.

BeetleB|1 year ago

> Even as a programmer, I've fallen into the static site generator trap a few times.

> It's annoying to start a side project with a static site generator and then realise I want to add a small feature and suddenly I wish I'd just started with a simple Rails or PHP app.

Hard to discuss without examples. I started using Pelican over a decade ago, and am still happy with it. Every once in a while I write code to customize the behavior, but it's once every few years. It's simple and just works.

There are things I miss from dynamic sites, but I don't see how a simple folder of HTML files is in any way superior to Pelican...

ciroduran|1 year ago

I've been posting to my personal website for 20+ years and it's been something like: basic HTML -> Drupal (whew) -> Wordpress -> basic HTML (via Jekyll).

The fundamental rule I've set myself against feature-bloating in my website is defining what I want it to be: an archive of things I've done. As an archive, I want it to be very durable in time. Thus, static file that are dead-easy to copy around, mirror and make it work in any hosting platform.

It did take me a while to nail having a bilingual site, though :) but at least it's a price I paid once.

renegat0x0|1 year ago

For blogging I use Hugo because it is just easier to focus on content, not on style. That is why I don't like writing pure html files. Changing style can also be a problem, if something is hardcoded into html file.

For more advanced tasks I write in django, because it so easy for me to add features.

oneeyedpigeon|1 year ago

> Nowadays, if I want a static site I just start with a folder of html files.

Same here. I've considered adding a .md —> .html step for content, but just haven't found it necessary — yet.

> The other cool thing...

I like being able to—easily—view my site via a local sever. The best case would be one that I can view via file:// too, but I couldn't quite crack the organisation and ended up with a 'make local' step that generates a separate copy for file-based viewing.

D13Fd|1 year ago

I run a blog for an organization. We do one post per business day on average, with typically around 3 posters. I set it up years ago with Django/Wagtail/Puput and it has happily chugged along ever since. I can’t imagine how annoying it would be to manage if people were creating their own new files for every post and writing their own HTML…

oliwarner|1 year ago

But you've had to maintain that Python/Django stack, as well as a server.. Right?! I've done hundreds of Django release upgrades. They're not automatic or time-free.

Most SSGs, especially those geared to blogging accept nicer markup systems like Markdown. Keeping track of things, even in a multi-user system isn't hard.

Getting non-technical people used to a git workflow is the hardest part.

nephanth|1 year ago

Now I'm wondering what kind of features you end up adding to your website that need server-side code. Comment systems?

andybak|1 year ago

How about a contact form?

echoangle|1 year ago

How are you handling commonality between pages with plain html pages? As long as you don’t use iframes, you have to manually sync everything that’s shared or almost the same on alle pages (header, footer, navigation). That’s pretty annoying.

lelanthran|1 year ago

> How are you handling commonality between pages with plain html pages?

I have a simple web component that lets me do `<include-file remote-src='...'>`.

That's basically 90% of what a more complex solution will give you.

handzhiev|1 year ago

<?php include("header.html');?> You only need to allow PHP to run in .html files (if you insist your files being named .html(

dizhn|1 year ago

Pretty sure parent didn't actually mean plain html files for everything but if they did then perhaps they're using server side includes.

Vegenoid|1 year ago

Amusing how underneath this comment, there are several comments saying "ah, you just haven't found the right SSG, this one is good". Well-intentioned, but completely missing the point.