Live data from Hacker News

Ivy – A static website generator built in Python

mulholland.xyz

21–30 of 76 posts

Re: Ivy – A static website generator built in Python

#21
It looks nice, but I guess I still[1] don’t understand the proliferation of simple static site generators. It’s pretty easy (and fun!) to build your own that works exactly as you want it to. And I don’t think a static site generator is suitable for non-technical users. Is there an in-between type of user technical enough to use a static site generator but not able to write their own? Or maybe the proliferation is only because they are both easy and fun to create?

[1]https://news.ycombinator.com/item?id=14877298

Edit: I didn’t intend for this to sound negative for the creator. Even if it’s just for fun and the chance someone else might find it useful, that’s enough of a reason to build it for me.

Re: Ivy – A static website generator built in Python

#22
Looks pretty nice for simple static sites. However on the homepage it says

> You can build any kind of website using Ivy but it's particularly suited to building project documentation

But unfortunately I'm not seeing anything about generating source code documentation from docstrings (like Sphinx). For me, that would make it much more useful.

Re: Ivy – A static website generator built in Python

#23

It looks nice, but I guess I still[1] don’t understand the proliferation of simple static site generators. It’s pretty easy (and fun!) to build your own that works exactly as you want it to. And I don’t think a static site generator is suitable for non-technical users. Is there an in-between type of user technical enough to use a static site generator but not able to write their own? Or maybe the proliferation is onl…

I think if people dedicated time to creating one for their own use it can be done (I am decent at Python and I would like to think that I can too) but at the same time I don't want to much around with HTML and particularly CSS.

I use static generators purely by available themes because that's the part that I hate the most.

Re: Ivy – A static website generator built in Python

#24
post #16

> Ivy is a static website generator. It transforms a directory of text files into a self-contained website. Perhaps a stupid question but isn't that what HTML was designed for? It doesn't even require a generator.

Suppose for instance you wanted a static blog. Blog engines like wordpress (or django or flask for python setups) generate parts of the site on the fly as users visit. For instance, you might generate the most recent 10 posts in some list somewhere. This requires some (often not much, but some) additional time from the server as these are generated on the fly. A static website generator like this allows you to make a…

One django app that provides this is django-bakery, you could run the local server to add or edit content using django-cms or mezzanine then use bakery to generate a static site to host.

https://github.com/datadesk/django-bakery

Re: Ivy – A static website generator built in Python

#25

It looks nice, but I guess I still[1] don’t understand the proliferation of simple static site generators. It’s pretty easy (and fun!) to build your own that works exactly as you want it to. And I don’t think a static site generator is suitable for non-technical users. Is there an in-between type of user technical enough to use a static site generator but not able to write their own? Or maybe the proliferation is onl…

I'm one of those people who falls into that group -- I can, and have, used a static site generator, but have nearly zero programming knowledge so couldn't make one of my own. The biggest issue I have now is choosing which one to use. I've mostly used Hugo, with good results, but always have that slight niggle wondering if there's something that would work a bit better for me.

Re: Ivy – A static website generator built in Python

#26
It's odd that this has gotten so many upvotes while there are thousands of other static site generators[1] and this one doesn't even provide a single explanation as to why it is different or why would someone prefer this over one of the most famous ones.

[1]: https://www.staticgen.com/

Re: Ivy – A static website generator built in Python

#27
post #16

> Ivy is a static website generator. It transforms a directory of text files into a self-contained website. Perhaps a stupid question but isn't that what HTML was designed for? It doesn't even require a generator.

The main advantage of a static site generator is it allows you to just write the contents of each page and the generator will insert that into a page template. It means that, for example, a site-wide navbar only needs to be written once rather than added to every page manually.

Even more importantly, if you change the navbar, it changes everywhere, no chance to forget, no tedious and error-prone copy-pasting.

Also, applying syntax highlighting to code fragments, doing the right thing around pictures, e.g. set explicit size, and many other seemingly trivial but tedious things.

In short, static site generators remove the legwork from static HTML.

Re: Ivy – A static website generator built in Python

#28

Looks nice. If we're going to compile our FE code (sometimes once with production babel/webpack builds, sometimes more often with every server-side rendered cache miss), then we might as well go all in with static-site generators. The epitome of this trend is https://www.gatsbyjs.org/ , a framework designed around GraphQL and React.

In more-or-less the same niche as Gatsby there is my Sitio[1], which also uses React (so kinda isomorphic pages), main differences being:

- No GraphQL stuff, but instead you'll use imperative JS code to tell the library which pages you want to build, with data from anywhere (files, CMSs, hosted contents elsewhere etc.) you can fetch using the same JS code, transform with any library etc.

- No Webpack, no Webpack transforms. I suffered when I tried to use Gatsby because of the gigantic dependencies on Webpack. I guess it's changed nowadays, but still I'm hurt and won't go back there. Here we're proud to use Browserify and go with more modular architecture.

[1]: https://github.com/fiatjaf/sitio

Re: Ivy – A static website generator built in Python

#29

It looks nice, but I guess I still[1] don’t understand the proliferation of simple static site generators. It’s pretty easy (and fun!) to build your own that works exactly as you want it to. And I don’t think a static site generator is suitable for non-technical users. Is there an in-between type of user technical enough to use a static site generator but not able to write their own? Or maybe the proliferation is onl…

>Is there an in-between type of user technical enough to use a static site generator but not able to write their own?

A lot of people who want pretty websites without writing or learning a lick of frontend technologies.

Re: Ivy – A static website generator built in Python

#30

It looks nice, but I guess I still[1] don’t understand the proliferation of simple static site generators. It’s pretty easy (and fun!) to build your own that works exactly as you want it to. And I don’t think a static site generator is suitable for non-technical users. Is there an in-between type of user technical enough to use a static site generator but not able to write their own? Or maybe the proliferation is onl…

>Is there an in-between type of user technical enough to use a static site generator but not able to write their own? Or maybe the proliferation is only because they are both easy and fun to create?

Not sure if you mean to ask why people don't create their own static sites (without generators), or did you mean dynamic sites using PHP/Ruby/Python?

For the argument over dynamic sites:

Yes - the type that does not want to worry about security vulnerabilities.

My blog is made via a static site generator. I updated infrequently (once every so many months). I want to have it up and running for years without my intervention (i.e. maintenance).

I once had a Wordpress blog and treated it that way. It was hacked.

Then I built my own in Django. Then at some time it went down because my service provider updated Python libraries, etc.

The funny thing is: Using a static site generator is no more work, and has no fewer advantages. Why should I use a dynamic site or build my own?

For the argument against static sites, well then you'd have to maintain lots of links manually. A SSG gives you a lot of that for free. And you can use templates.

Post reply on HN