Using a static website generator for a blog on a dynamic website?

I am exploring the blog / content section on my vibrant website. Can I use a static website generator, such as Hyde, to create a โ€œpiece of static contentโ€ on a website?

Benefits:

  • simple / simple for several other people to submit articles
  • performance
  • using a similar stack as the whole site - in my case, using Hyde and the same syntax as django templates
+4
source share
2 answers

I would use flatpages for this. With the flatpages app, you can put your content (blog posts) directly into HTML, but you will have the advantage of templates (using a base site template or just a custom one for your blog). You can also keep track of how many pages are in the admin panel. You can also โ€œoutsourceโ€ something like Disqus and maintain a sense of dynamism.

However, I would really think about the reason why you are doing this. Getting a blog post from db is not a very awesome operation if your server is not too busy as it is.

0
source

You will not be the first person to do this. I still really like how Ruby Jekyll (from which Hyde is the Python port) is a little ahead in this respect, but I also came from the Python / Django background and can understand the desire for some uniformity.

Most of the examples I can think of are done with people using Jekyll, but this blog post says about one person moving from WordPress to Hyde, that they seem to be very happy , as well as this Hyde blog , both of which are potentially have helpful tips for you. Disqus seems to be the preferred commenting platform, and you integrate it simply by embedding JavaScript in your site , so this is a great solution for a static site.

Actually, I do not see "performance" as a serious problem; I may be doing you an injustice here, but it usually seems that those who have enough blog traffic causing performance problems are in a state where they have the money to put a caching layer / additional servers on it. For me, the advantage lies in the flexibility of hosting (almost any of them will host static HTML for you very little) and "security" (the only thing that will be on the server side is the web server).

0
source

Source: https://habr.com/ru/post/1341747/


All Articles