3 ms·
Great question. Harp is a great static site generator. First of all, Harp works completely differently from SSGs like Jekyll in that it doesn't regenerate the
by sintaxi 13y ago
Great question. Harp is a great static site generator.
First of all, Harp works completely differently from SSGs like Jekyll in that it doesn't regenerate the entire application every time you change a file. Instead, harp only generates the static assets as it needs to (in-memory) to serve any given request and it doesn't spew out any files. This was throwing a lot of people off when they thought of it as an SSG because they were expecting harp generate a bunch of files and then serve those assets. So even though Harp has a `compile` function for exporting your application to static assets, it behaves and is built much more like static web server than a static site generator.
Second, Harp unlike Jekyll doesn't have a strict convention of how your application is structured with a `_posts` directory and a `_layouts` directory. Instead, URLs with harp map directly to your file structure exactly as a static web server does. So if you want the url `/articles/hello-world` you must have a file in your project called `hello-world.md` or `hello-world.jade` in a directory called `articles`. The mental model of a web server translates much better to this paradigm.