[Django]-Using a static website generator for a blog on a dynamic website?

0👍

I would use the flatpages app for this. With the flatpages app you can still put your content (blog posts) directly on the HTML but you’ll have the advantage of templating (using you base site template or just a custom one for the blog). You’ll also be able to keep track of how many pages there are on the admin panels. You can also “outsource” comments to something like Disqus and maintain a dinamyc feel.

Still I would really think about the reason why you’re doing this. Getting a blog post from a db isn’t a very performance shattering operation unless your server is overly strained as it is.

👤vascop

0👍

You’d be far from the first person to do this. It still very much feels to me like Ruby’s Jekyll (of which Hyde is a Python ‘port’ of sorts) is a bit more ahead in this regard, but I also come from a Python / Django background and can understand the desire for some h*m*geneity.

Most examples I can think of are done with people using Jekyll, but this blog post covers one person’s move from WordPress to Hyde that they seem quite happy with, and there’s also this Hyde blog, both of which potentially have some useful advice for you. Disqus seems like the comment platform of choice, and you integrate it simply by embedding some JavaScript in your site, hence it’s a beautiful solution for a static site.

Realistically I can’t see “performance” as a major issue; I may be doing you an injustice here, but it generally seems like those with enough blog traffic to cause performance issues are in the state where they’ve got the cash to lob a caching layer / extra servers at it. For me, the advantage has been in the flexibility of hosting (pretty much anyone will host static HTML for you for very little) and ‘security’ (the only thing executing server-side will be the webserver).

Leave a comment