
Ivy: a minimalist static site generator in Python - dmlhllnd
https://github.com/dmulholland/ivy
======
cvwright
Ivy looks great. That said, every time I see a new SSG in Python, I get all
excited about it for a minute. Then I remember this bit of advice: "Just use
Jekyll".

> Jekyll is not better than the rest for any fundamental design reason; it’s
> better because it’s enormously popular and therefore excels in the long tail
> of details.

> ...

> If, like me, you secretly believe that everything is better if it’s written
> in Python, I still suggest you start with Jekyll (which is done in Ruby). In
> my experience, using Jekyll does not require writing or reading a single
> line of Ruby.

[http://www.cs.cornell.edu/~asampson/blog/jekyll.html](http://www.cs.cornell.edu/~asampson/blog/jekyll.html)

This matches my own experience pretty well.

~~~
petepete
I think Hugo is popular enough these days for that argument to apply to it.
It's far easier to get up and running, too.

~~~
ams6110
Agree. I haven't tried many alternatives, but had a need for a quick website
recently and Hugo was exceedingly easy to use and has a lot of nice looking
themes.

------
bgrohman
For a _minimalist_ static site generator, I think it's hard to beat just
writing your own that does exactly what you want and nothing else. In a
hundred lines or less of Python, you can have your minimal generator, know
exactly how it works and how to extend it, and be able to refresh your memory
on conventions/configuration with thirty seconds of scrolling through the
source.

~~~
bachmeier
I've found that for static html it's easiest to put all the files into one
directory, manually create an index file, and copy a five-line Makefile into
the directory that compiles everything to html using Pandoc. I wasted too much
time using something written the way others wanted it. When I wanted to change
something, I'd be digging through bad documentation (if it was documented at
all). I'd have to remember a gazillion different configuration options.
Sometimes automation makes things worse, because you'll never use most of the
options, yet they get in your way, and it's at best just good enough, never
the way you want.

------
fiatjaf

      mysite/
        site.py      # site configuration file
        ext/         # extensions directory for plugins
        inc/         # includes directory for menus, etc.
        lib/         # library directory for themes
        out/         # output directory for html files
        res/         # resources directory for static assets
        src/         # source directory for text files
    

Isn't this way too messy?

What are the advantages of this over the other 1000000 static site generators?

~~~
mixmastamyk
On the contrary, it appears hyper-organized.

~~~
codegladiator
not properly hyper-organized == messy

------
shalabhc
This is public domain, which is very generous, but apparently problematic.
E.g. see comments here [https://www.red-gate.com/simple-talk/opinion/geek-of-
the-wee...](https://www.red-gate.com/simple-talk/opinion/geek-of-the-week/dr-
richard-hipp-geek-of-the-week/):

"If I had known as much about copyright in 2001 as I know now, I probably
would have gone with something like the Apache license. Live and learn…"

~~~
bachmeier
It's really only problematic if you want businesses to use it. They don't just
want the right to use it, they want to be given permission explicitly. One
reason is that public domain is not recognized everywhere. It's unlikely a
static site generator needs to worry about being public domain.

~~~
nine_k
I wonder how do businesses make do with SQLite's public domain license. I see
it used everywhere.

~~~
bachmeier
They can buy an alternative licensed version from Richard Hipp if they're
worried about it.

------
krick
No disrespect, but, seriously, given that project was created 9 months ago,
"minimalistic static site generator" isn't really sufficient project
description, let alone marketing slogan. What I want to know is why to use it
over

* Jekyll

* Hakyll

* Hugo

* Pelican

* Sculpin

* ...

------
alpb
Try Hugo if you do not care about the language it's written in. It has a
pretty vibrant community. [https://gohugo.io/](https://gohugo.io/)

~~~
foob
We use Hugo for our site's blog and we really appreciate the speed of
compilation and the overall simplicity [1]. That said, it can be frustrating
that it's not really possible to add or modify markdown extensions. If you
want to do something as simple as adding some custom classes to tables and
rows then you're pretty much out of luck. The closest that you can get is to
switch out the renderer for mmark and use inline attributes, but that's still
extremely limited. We often end up writing HTML in the templates when I would
_much_ rather be able to extend the renderer. I understand that this is a
trade-off and that there are benefits to each side, but I wish that I
understood the limitations better before deciding to go with Hugo.

On the other hand, python-markdown is an extremely well-designed library and
it's an absolute joy to hack on and extend. Once upon a time, I used it to
throw together an API documentation renderer for Mono class library
documentation on a now dead product [2]. Overall, I enjoyed that a lot more
than my experience with Hugo and I will probably use something python based
for my next static site.

[1] - [https://intoli.com/blog/](https://intoli.com/blog/)

[2] - [http://gaming.intoli.com/docs/api/](http://gaming.intoli.com/docs/api/)

------
noir_lord
[http://mulholland.xyz/docs/ivy/themes.html](http://mulholland.xyz/docs/ivy/themes.html)
is gorgeous on FF/Android.

I might replace my static blog script with this :)

~~~
wlesieutre
On an iPhone SE it uses 25% of the screen on side margins, which is a bit
excessive.

------
ue_
I don't mean to detract from Ivy, but...

As an interesting aside, the fact that you can organise your pages in a
hierarchy reminds me of cat-v's "werc" website framework[0]. It's not a static
site generator, but it will read the directory and file tree into a navigation
menu, so you can navigate the tree using a sidebar. It will render pages using
markdown on the fly.

Perhaps the "killer feature" is that you can run multiple subdomains using one
instance. If you configure your web server correctly, a request to x.y.com
will serve the website stored in the x.y.com directory etc.

It's also very small and extensible.

[0] [http://werc.cat-v.org](http://werc.cat-v.org)

~~~
0xCMP
Never took a close look at werc. Pretty cool idea. I wish it were a more
modern theme, but I'm guessing that can be changed/fixed easily. The idea
stands and it's written in a simple way which is nice.

------
jwilk
Poor name choice:

[https://ant.apache.org/ivy/](https://ant.apache.org/ivy/)

[https://github.com/robpike/ivy](https://github.com/robpike/ivy)

~~~
teraflop
Apache Ivy has been effectively a dead project for years; I'm fine with
letting someone else have a turn using the name.

~~~
jwilk
[https://github.com/apache/ant-
ivy/commits/master](https://github.com/apache/ant-ivy/commits/master) doesn't
look very dead to me.

~~~
teraflop
What do you know, someone's actually working on it now!

Last time I checked (a few months ago), the project had gone about 2.5 years
with no releases, no public mailing list activity, and almost no non-trivial
source code commits. Bug reports, whether trivial or show-stopping, were
consistently ignored, e.g.
[https://issues.apache.org/jira/browse/IVY-1485](https://issues.apache.org/jira/browse/IVY-1485)

It looks like some of the Ant contributors finally got around to picking up
the project again a couple months ago. Here's hoping that they can get things
back on track.

------
tedmiston
Looks like a cool project. What made you choose to build this vs use an
existing one like Pelican, Nikola, or Lektor?

Have you thought about integrating a bundler like Webpack or something
similar, and also support for Sass?

~~~
mixmastamyk
Not sure but I tried Pelican recently and found it clunky. Perhaps not fair as
I was comparing it to Sphinx which I've a lot of experience with and is quite
advanced.

------
otterpro
I've used Pelican before and I'm currently using Jekyll, but this looks
interesting enough to try on a small blog/project, and I like what I see. I
wish it were more blog-oriented, or have a blog plugin, so it makes
creating/managing blogs easier.

------
krosaen
Cool!

Would appreciate a motivation section in the readme, specifically whether this
addresses needs better than others (especially Lektor which seems aimed at the
same use case).

Or not, it's your project, can just be because you wanna :)

------
type0
I like that it has the syntex support which seem to fix some of Markdown
faults related to HTML

~~~
metalliqaz
Your comment intrigued me because I've never heard of syntex. I must say, it's
hard to find. Not only is Syntex apparently a commonly used company name, but
.stx is already used by another markup language, "structured text".

The sheer number of lightweight markup languages is truly amazing.

------
mrkgnao
I really think the only thing differentiating these static site generators
from each other is how pretty the demo site's CSS is. :/

Ivy looks great, though.

------
git-pull
Consider creating a page to put on on website that compares and contrasts Ivy
compared to other static site generators. Link to via Readme

A similar conceptual example:
[https://vuejs.org/v2/guide/comparison.html](https://vuejs.org/v2/guide/comparison.html)

Mention whether your SSG supports reStructuredtext, markdown, etc.

------
nine_k
The way --watch is implemented is pretty, mmm, crude.

[https://stackoverflow.com/a/597962/223424](https://stackoverflow.com/a/597962/223424)
lists saner alternatives for the major platforms.

------
euske
What I think would be awesome is a html "rename" tool, which is to rewrite all
the relative urls and filenames in HTML/css files when changing their
location. Does anyone know?

------
ateesdalejr
Ah this is quite interesting... I was working on making my own one of these. I
might just use this instead!

~~~
cryptos
There are already two or three static site generators out there ...
[https://staticsitegenerators.net/](https://staticsitegenerators.net/)

~~~
lolikoisuru
It would be nice if that site also listed how many lines of code each of them
are.

~~~
cryptos
And what relevance would have such a metric?

