4 ms·
I have to say I don't really understand the point of these projects. Faced with the problem of generating a static part for my website, I just used Django to "p
by seertaak 9y ago
I have to say I don't really understand the point of these projects. Faced with the problem of generating a static part for my website, I just used Django to "print" the static part. I'm not saying you need to use Django (although in my case it has clear advantages, namely that you write everything using a single tool), but.... left pad, anyone?
- dualogy 9y agoGood starter project for learning a new language. You get to touch various interesting areas from IO to templating to a simple modicum of "dependency tracking" (for incremental rebuilds), many neat areas to learn/try optimizations, and now matter how hard it is at first or how deep down the feature-creep rabbit hole you go, at some point it's just gonna be done. Not a bad package
- Keats 9y ago> but.... left pad, anyone? Actually, unless you're committing the wheels in your repo left-pad is more likely to happen with your solution than with a binary since someone could login and remove all versions of Django from Pypi (unless it's just yanking them instead of completely deleting them, not sure). On the other hand, you can just commit a binary in the repo and it will keep working assuming you don't change platform.
- BeetleB 9y ago>Faced with the problem of generating a static part for my website, I just used Django to "print" the static part. Because I don't want to spend too much time maintaining my site. When I used Wordpress, it got hacked. I don't want to check every few months for security updates. When I used Django, it would randomly "go down" when some library changed on my host. Then I'd have to figure out how to fix it. Which almost always involved upgrading to the latest Django, which was never straightforward. But the static site generator I have? Runs on my machine and not on a server. I still have the same problems with it as with Django (upgrades breaking stuff). The important thing is that it breaks stuff on my PC and not on the server. People can still access my site while my generator is broken. I feel no pressure to fix it (and indeed, it is usually months before I do fix it). And, finally, I think you don't really know what SSG's do for you. It's not about making one or a few pages static. It is about making it appear dynamic while being static (tag pages, categories, etc). In fact, I would invert the question. Given that a SSG can do pretty much anything a blog can do, why would someone use a server side process to write a blog? What's the point of having your blog in Django when a simple SSG will do the task for you?
- seertaak 9y ago> When I used Django, it would randomly "go down" when some library changed on my host. I haven't had that problem. Django is alright IMO, if a little "heavy" on machinery. I'm not crazy about it, but it gets the job done and I do have a soft spot for python :)
- BeetleB 9y ago>I haven't had that problem. Django is alright IMO, if a little "heavy" on machinery. It might help to keep in mind that I've had Django running on a server since around 2008. You can imagine that Django has changed a lot since then. Every year or two the site would go down as the host would change their Python libraries. So I'd need to update Django, which was always nontrivial if you're changing from a version that was a few years older. Perhaps Django is stable enough now that you can upgrade Django versions every 3-4 years and have it go smoothly. But not in those years. Arguably, you could say I should have had my own Python + Django + all libs installed in my user area and not have relied on my host's environment. Or used a Django friendly host that provides this to you automatically. At that point I'd go back to my question: Given that a SSG gives you a blog right out of the box, why should I even consider Django? I don't want to be constrained by hosts, and I don't want to have my own custom Python install for each site I host.
- steveklabnik 9y ago> left pad, anyone? Crates.io is immutable (to the legal extent possible), and so that can't happen with this.
- seertaak 9y agoSorry, that comment was a bit flippant -- I have huge respect for the Rust language and community and agree that the left-pad-debacle is pretty unlikely to happen there. What I meant is that I consider static blog generation so simple that you should be able to do it yourself. I hope that doesn't come across as arrogant, above I allude to the fact that for my case, it took 51 LOC of python to get it done (admittedly harnessing the machinery of the existing, dynamic website).
- steveklabnik 9y agoIt's all good. Notably, it can't happen with npm anymore either, so maybe just not the best analogy to make ;)
- coldtea 9y ago>Faced with the problem of generating a static part for my website, I just used Django to "print" the static part. Sounds way more involved compared to what you'd do with just a static site generator -- especially one that's a single binary.
- seertaak 9y agoThe website is a commercial one which accepts payments and vends licenses (https://zenaud.io https://zenaud.io). So some kind of dynamic website is necessary. Printing to static html is a file (51 LOC) with a single function definition. I'm pretty sure just reading the docs on the Hugo or whatever takes longer than it took me to write the it :)