6

The idea seems to be very similar by keeping actual content separate from the final output rendering so that changing the template or styling is trivial.

unor
  • 92,415
  • 26
  • 211
  • 360
Treffynnon
  • 21,365
  • 6
  • 65
  • 98

1 Answers1

4

2 things that spring to mind:

  1. You don't have to write the transform engine yourself
  2. You don't have to write your pages in XML; in Hyde, for instance, you can write your pages in Markdown and use filters to convert it to HTML

UPDATE: Regarding the idea behind it, I think the main goal is to get (most of) the benefits of a dynamic blog or cms engine, but all the performance (especially w.r.t. memory footprint) wins of static files. As a secondary benefit, this enables you to write your content in your favorite text editor and version it using your favorite version control tool.

Hank Gay
  • 70,339
  • 36
  • 160
  • 222
  • Fair points. On point two though I think writing in XML could be better as it is easily consumable by javascript as well for instance whereas as far as I am aware Markdown isn't as flexible. Writing in XML could also give you the ability to easily release versions as DocBook compatible files etc. – Treffynnon Sep 01 '10 at 12:49
  • @Treffynnon Most people using a static site generator have no plans to translate their site into DocBook, or to directly consume the original source via JavaScript. Since Markdown allows you to embed HTML (and presumably XHTML), they might still be able to do that, but it's probably the wrong tool for the job, at that point. – Hank Gay Sep 01 '10 at 14:42
  • *"You don't have to write the transform engine yourself"* -- Don't understand this point. There are plenty of XSLT processors. I wouldn't need to write one. Sure, you may want to process all files in a directory recursively or something, but that's a 5-10 line script. – aioobe Jan 16 '18 at 17:37
  • @aioobe You have to write all the XSLT yourself. That's basically writing your own static site generator. Unless you're just bored or something, I don't see any reason to do all that work when other people have done it for you, and probably done a better job of it (you'd be amazed at the corner cases that pop up for things like this). – Hank Gay Jan 16 '18 at 21:04
  • "All the XSLT"? There's extremely little boilerplate in an XSLT template. You need to write a basic layout template in Hyde and Jekyll too, although in Jekyll for instance, the language is Liquid. – aioobe Jan 16 '18 at 22:58