8 ms·
Ivy: a minimalist static site generator in Python
- tedmiston 9y agoLooks 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 9y agoNot 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.
- type0 9y agoI like that it has the syntex support which seem to fix some of Markdown faults related to HTML
- metalliqaz 9y agoYour 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.
- ue_ 9y agoI 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 9y agoNever 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.
- noir_lord 9y agohttp://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 9y agoOn an iPhone SE it uses 25% of the screen on side margins, which is a bit excessive.
- fiatjaf 9y agomysite/ 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 9y agoOn the contrary, it appears hyper-organized.
- codegladiator 9y agonot properly hyper-organized == messy
- ateesdalejr 9y agoAh this is quite interesting... I was working on making my own one of these. I might just use this instead!
- cryptos 9y agoThere are already two or three static site generators out there ... https://staticsitegenerators.net/ https://staticsitegenerators.net/
- lolikoisuru 9y agoIt would be nice if that site also listed how many lines of code each of them are.
- cryptos 9y agoAnd what relevance would have such a metric?
- gringoloco 9y agoMerovíngios
- otterpro 9y agoI'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.
- shivkanthb 9y agoReally cool :) Which markup parser does this use?
- shalabhc 9y agoThis 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-week/dr-richard-hipp-geek-of-the-week/ https://www.red-gate.com/simple-talk/opinion/geek-of-the-wee...: "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…"
- jwilk 9y agoThey put the interview in a table? Ewww. :(
- penpapersw 9y agoTables are good for tabular data. I'd argue that it's potentially arguable that this may actually be tabular data. Either way, now that you mentioned it, I don't know whether my knee-jerk reaction would have been that it's good or bad, or if I'd even notice it at all, heh.
- tedmiston 9y agoIt's pretty hard to argue a chat transcript as tabular data. <dialog> <dt>Sam</dt> <dd>Knock, Knock.</dd> <dt>Eric</dt> <dd>Who's there?</dd> <dt>Sam</dt> <dd>Justin.</dd> <dt>Eric</dt> <dd>Justin who?</dd> <dt>Sam</dt> <dd>Justin time for dinner!</dd> </dialog> http://html5doctor.com/a-little-more-conversation-with-dialog/ http://html5doctor.com/a-little-more-conversation-with-dialo...
- Semiapies 9y agoYou'll want to use a <dl> tag for that in html5, I suppose.
- jwilk 9y agoHuh, according to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog https://developer.mozilla.org/en-US/docs/Web/HTML/Element/di... , the <dialog> element represents a dialog box or other interactive component, such as an inspector or window.
- jwilk 9y agoPoor name choice: https://ant.apache.org/ivy/ https://ant.apache.org/ivy/ https://github.com/robpike/ivy https://github.com/robpike/ivy
- oneplane 9y agoBut does it work with ANT or Maven? ;-)
- davvolun 9y ago> https://pypi.python.org/pypi/ivy-python https://pypi.python.org/pypi/ivy-python Ivy: a lightweight software bus I can't disagree. You can't even easily filter down searching 'ivy python' or similar
- unhammer 9y agoAnd the popular lightweight interactive completion interface for Emacs called Ivy http://oremacs.com/swiper/ http://oremacs.com/swiper/
- teraflop 9y agoApache Ivy has been effectively a dead project for years; I'm fine with letting someone else have a turn using the name.
- jwilk 9y agohttps://github.com/apache/ant-ivy/commits/master https://github.com/apache/ant-ivy/commits/master doesn't look very dead to me.
- teraflop 9y agoWhat 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.
- cvwright 9y agoIvy 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.
- deleted 9y ago[deleted]
- petepete 9y agoI think Hugo is popular enough these days for that argument to apply to it. It's far easier to get up and running, too.
- siddhant 9y agoIt can be difficult to extend/modify the SSG in case you don't know the language. So I would still recommend picking one based on the language you're most at home with.
- BeetleB 9y agoOK - Serious questions for things I've done in Pelican: 1. Can I get Jekyll to use Org files without writing any Ruby code? 2. Can I get Jekyll to handle math using MathJax without writing any Ruby code? 3. Can I get a "next article for a given tag" in Jekyll without writing any Ruby code? (What I essentially need: A post usually has "next" and "previous" article links. I want a "next" and "previous" article for every tag the post is tagged with). Not at home so I can't see what other custom code/plugins I use, but this is a good list to begin with.
- krosaen 9y agoCool! 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 :)
- alpb 9y agoTry 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/
- cryptos 9y agoI've tried a few static site generators and I've written my own in Python. But they all sucked at some point - despite Hugo! Hugo is incredible fast, offers many features and is pleasant to use. But the killer feature is: Hugo just works out of the box without the need for an annoying setup. Just copy the binary and you are done!
- foob 9y agoWe 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/
- bgrohman 9y agoFor 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 9y agoI'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.
- lolikoisuru 9y agoMine is exactly 46 lines long. Most of these crappy site generators are anywhere from 20000 to 300000 lines. It takes longer to read the introduction to most static site generators than it takes to read and understand a proper minimal static site generator's source.
- nine_k 9y agoThe 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.
- krick 9y agoNo 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 * ...
- euske 9y agoWhat 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?
- git-pull 9y agoConsider 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.
- mrkgnao 9y agoI 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.