Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Static Site Generators
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Static Site Generators

jemaltzjemaltz Member
edited January 2016 in General

I came across this list of static site generators, and thought it was worth sharing:
https://www.staticgen.com

Static sites are an interesting topic, as they certainly make things easier from a server standpoint, but they require some clever workarounds for functionality.

Does anyone have personal experiences to share?

Comments

  • I use Jekyll to generate 2 static sites. One for my resume and the other for a blog.

    Low resources requirements and it just works. Happy with it so far!

    Thanked by 1jemaltz
  • Wow looks amazing actually

  • jeromeza said: I use Jekyll to generate 2 static sites. One for my resume and the other for a blog.

    How do you handle some of the dynamic things we take for granted - comments, contact forms, site search? I know that there are workarounds for all of them, just curious to hear about specific setups :)

    ManofServer said: Wow looks amazing actually

    Agreed! Jekyll, Hexo, and Hugo all caught my eye!

    Thanked by 1ManofServer
  • raindog308raindog308 Administrator, Veteran

    Jekyll (ruby, yuck) or Pelican (puthon, yum) and Disqus for comments.

  • Static rules. No experience of using these tools, though. Hopefully you get some good insights in the thread. Tuning is as much an art as science.

    clever workarounds for functionality

    Not so much, I think... but definitely careful planning.

  • @raindog308 said:
    Jekyll (ruby, yuck) or Pelican (puthon, yum) and Disqus for comments.

    Pelican! I switched to Pelican from WordPress awhile ago and I don't think I'd go back.

    I coded a handful of custom plugins to handle some specific things I needed and it works great.

    @jemaltz, there are a few solutions for comments but Disqus is probably the easiest and a lot of Pelican templates support it out of the box. Search the Pelican plugins repo on GitHub for comments and search solutions. There are a few but keep you expectations realistic, static sites have some trade offs and the dynamic elements like comments and searching are two of them.

    Thanked by 1jemaltz
  • I used Acrylamid, but as it is not actively maintained any longer I use Hugo now. Static Site generators are great in general, but I figured you spend a lot of hours building snippets and workflows without actually blogging. That's why for some purposes I still use Wordpress. It's just a lot easier to upload some pictures, place them, automatic resize and so on.

    But anyway the speed of static sites is incredible in comparison. I really enjoy that advantage a lot.

    For search use Google ("search term site:mysite.com") and for comments use Disqus or Isso if you want to host them yourself.

    Thanked by 1jemaltz
  • I use Metalsmith (https://github.com/metalsmith/metalsmith), it is NodeJS based. I find it very extensible because of the available modules in NPM, and it is being very actively developed.

    As for comments, I use disqus, its just nice to off-source this out of my platform, now I don't have to deal with those pesky spam comments that I had with Wordpress.

    When needing database (It's static site, but yeah, there are some things that we need DB for, such as contact form), I use Firebase (https://www.firebase.com/) it allows client side direct connection to the DB, obviously you can also use Google Docs for this, and tons of other solutions out there.

    However, I agree what @chrisp said about Wordpress, it's just a lot easier to start writing right away with Wordpress, setting these up takes time.

  • @jemaltz said:
    static site generators

    In truth, any solution can generate a static site. All you have to do is design with the intent to render the site static. Sometimes you don't even have to do anything much at all; just run the root URL through wget and you've got your static site.

    My blog is a "hybrid" site. It uses features of Apache to provide basic templates for the other files on the site that are static. No special frameworks necessary.

  • jemaltz said: How do you handle some of the dynamic things we take for granted - comments, contact forms, site search? I know that there are workarounds for all of them, just curious to hear about specific setups :)

    I think that is the real problem. For regular content, just write html ffs.

    Just using a little bit of php for forms doesn't seem to give much of a performance hit. Comments are a bigger problem and that is probably the main reason Disqus became so popular. The main idea being to do the processing off-site. You still need a bit of php though.

    If anybody is interested, here is another list: https://staticsitegenerators.net/

  • Checking this out : http://pingendo.com/

    Uses Bootstrap as a base.

    Thanked by 1desperand
  • As for handling dynamic content; there's plenty of great Disqus alternatives out there and their FOSS as well. Check out Isso.

  • k0nsl said: As for handling dynamic content; there's plenty of great Disqus alternatives out there and their FOSS as well.

    Well I do thank you for the isso suggestion. It looks very interesting. However, I'm doubtful that there are "plenty" other ones "and their FOSS as well" out there. Would you be so kind as to give us some links?

  • Static doesn't have to be all-or-nothing; there's no reason you can't throw some PHP onto your static generated site. You can also get pretty far on your dynamic site using memcached, nginx micro-caching, etc. -- there's a wide spectrum. But many WordPress blogs unnecessarily require php-fpm and MySQL, when the job could be done just fine without either. In the spirit of Low End, I think static generators are really worth promoting.

    I'm a fan of Pelican with Bootstrap themes. I try to avoid comments, but Disqus is an easy plugin if needed. I've heard good things about Nikola, too.

  • raindog308raindog308 Administrator, Veteran

    To some extent it depends also where you want to host. If you are trying to host off S3 or Github or entirely on a CDN, you need a static site generator.

    If you're on shared hosting or running your own VPS, you have to ask why you want a static site generator. If you just like a particular system, more power to you, but if you're doing it for performance, maybe you just need a cache.

    As @seanho said, it doesn't have to be all or nothing.

    k0nsl said: plenty of great Disqus alternatives out there

    I fooled around with writing a self-hosted one, but then I realized...what am I doing? Why not just use a blogging engine with comments if it's self-hosted :-)

  • I don't have any time at the moment to dig 'em out for you. Perhaps I can do it later tonight, or tomorrow.

    I should have used another word for "plenty"; it can mean pretty much anything depending on who's using it, and depending on context.

    @Ole_Juul said:
    However, I'm doubtful that there are "plenty" other ones "and their FOSS as well" out there. Would you be so kind as to give us some links?

  • Visited a few of them and installation seems a little complicated :(

  • Testing out CloudFront backed by S3 and GitHub for static sites right now.

    I use SHTML for re-usable headers and footers and convert to HTML before upload.

  • k0nsl said: I don't have any time at the moment to dig 'em out for you. Perhaps I can do it later tonight, or tomorrow.

    I should have used another word for "plenty"; it can mean pretty much anything depending on who's using it, and depending on context.

    No worries. :) It's just that I've spent some time looking and have not found much that suited me, so would be interested in anything that Google hasn't already dug up for me. Of course, like you say, plenty depends a lot on one's personal criterion.

  • Been using Jekyll, but after looking at Pellican, think i'll give it a shot!

  • aglodekaglodek Member
    edited February 2016

    Drupal (dynamic backend) + reverse proxy (e.g. haproxy, varnish or nginx - take your pick! - as static web head) makes for best of both worlds and more!

  • raindog308 said: If you're on shared hosting or running your own VPS, you have to ask why you want a static site generator. If you just like a particular system, more power to you, but if you're doing it for performance, maybe you just need a cache.

    I think that there's something to be said for the portability of a completely static site, including its ability to be hosted on a small-but-reliable VPS due to the low processing requirements for serving the site, even under heavy load.

    One idea that I had is to load the whole site onto a ramdisk on load/update, in order to prevent any disk hits at all when serving. Even a medium sized site would fit on a small VPS, and performance should be exceptional.

    A few people have mentioned that you can create a "mostly static" site with some PHP sprinkled around, but I think that such an approach begins to miss the point when we're talking about static site generation. For one, it requires an additional component in the stack that could otherwise be completely avoided. That said, I would find a site generator that leaves room for some dynamic functionality, but has no database backend (including flat-file databases), to be interesting, but I think its use case is limited (e.g. it could only handle non-persistent data, like contact forms, but it couldn't handle adding any persistent data, so is it really worth it?).

    Regarding putting up a caching reverse proxy in front of dynamic sites: I agree, but that's not the point of this thread :) I actually think that's probably a better choice than going with the "mostly static" option, to be honest.

    Ole_Juul said: I think that is the real problem. For regular content, just write html ffs.

    It's easy to say, but just adding new HTML pages to a site lacks a lot of the functionality that people expect from modern website platforms: themes, and any website content that should be the same from one page to the next (but should also be easily updated site-wide). You could accomplish this through a major amount of SSI, or placeholders/templates (if your web server supports them), but you would still miss out on lots of features that are totally doable with a static generated site. This is easily accomplished with a dynamic site, but if you're only using PHP to regenerate the same content over and over, then you're overcomplicating your setup (though plenty of people do this, because it's easier to overcomplicate things).

    I think that the main goal of static site generators is to be the best of both worlds, and I'm not sure it's such a terrible idea...

  • I am keeping my literary personal archives on my own static site engine (it's hooked into version conrtol system and updates the site automatically after I commit changes). It's very old and perhaps not too bright, but works good enough.

    I am also moving my blogs previously run under Drupal, to Sculpin.

    The first static site generator I worked with was Ikiwiki, I still have very good memories about it.

  • raindog308raindog308 Administrator, Veteran

    jemaltz said: One idea that I had is to load the whole site onto a ramdisk on load/update, in order to prevent any disk hits at all when serving. Even a medium sized site would fit on a small VPS, and performance should be exceptional.

    You'll probably get that the same performance even if you leave it on old SATA disk. The OS will cache disk so as long as RAM isn't under pressure, all your HTML/JS/CSS/images/etc. will sit in RAM anyway,

    Another popular option: https://getkirby.com (but not free)

  • I use metalsmith with some custom plugin for my personal site.

    The use case for me are:

    • I'd like to write with a full fledged editor, such as vim or sublime instead of the lame web form.

    • I want a powerful pipeline for the rendering part, very few blog engine supports pandoc.

    • I have quite a few notes in the ipython notebook format, easier to convert to html with customized pipeline.

    I agree I have spent many hours to customize/optimize the pipeline, maybe too much time, and it is arguably fruitful for me to understand the front end work: sass, npm, gulp etc.

  • @jemaltz said:
    This is easily accomplished with a dynamic site, but if you're only using PHP to regenerate the same content over and over, then you're overcomplicating your setup

    In my experience, that has also become true of software for static site generation. I went looking to get my blog off Drupal near the end of 2014, and even then the dependencies imposed by specialized static generators made me think it was just easier to use one of the popular web frameworks I knew well, and just render it static with wget (or go with the truly back-to-basics RAGtag solution that I ultimately settled on).

    From a LEB perspective, I think "static" is a red herring. The real issue is limited resources, and the fact that most of the popular web frameworks only seem to be interested in scaling up for enterprise sites. Static is certainly the lowest common denominator, but there's plenty of room to find solutions between that and these kitchen-sink solutions that everyone defaults to.

  • impossiblystupid said: In my experience, that has also become true of software for static site generation.

    Offloading the dependencies to generation instead of runtime still puts you in a better situation: You'll be serving pageviews more rapidly than you'll be creating new content. Platform bloat still needs to be managed, though. If site generation takes too long, then a static site generator won't last long.

    I'm big on caching, but not serving pre-rendered pages. Seems to me like using a system that expects certain functionality that it can't use is asking for trouble.

    impossiblystupid said: Static is certainly the lowest common denominator, but there's plenty of room to find solutions between that and these kitchen-sink solutions that everyone defaults to.

    I agree, although short of each site using a custom solution (which won't happen), any framework will be a "kitchen-sink" solution. I think that finding the balance between what can be static generated and what needs to be dynamic is an important area of optimization that is overlooked today.

  • @jemaltz said:
    Offloading the dependencies to generation instead of runtime

    It's not offloading: generation is runtime. The difference here is that the target platform is separate from the source platform. Once you've made the decision to do that, there are many more important factors to consider in choosing a framework than the non-feature of static generation.

    I'm big on caching, but not serving pre-rendered pages.

    And maybe that makes sense for some things, but a LEB might not have the resources to even run the app, let alone a cache on top of it. Again, it all comes down to the decisions you make. If Rails has some feature that makes it the best choice for you to create a read-only site, but you want to put it on a small 64M VPS for some reason, your best bet is to render it static from a more capable development box.

    I agree, although short of each site using a custom solution (which won't happen), any framework will be a "kitchen-sink" solution.

    I disagree. The bloat happens because developers assume some feature is common enough to be the default, so they make it difficult (or impossible) to use a less resource-intensive alternative. I still have some low-traffic sites that run just fine as straight CGI scripts. Are there any modern frameworks that can still be configured to work that way, or do they all want/require some sort of resource-sucking app server to be stuffed in the middle to handle requests to the resource-sucking app that is connected to a resource-sucking database?

    I think it is quite possible to have a truly scalable framework that offers features that are in line with the resources that are available, scaling all the way down to a tiny LEB that might otherwise only be able to serve up static content. But instead we get these frameworks that are based on "features" that make no sense, like static generation. I keep hoping to find something that is built around the "microsite" fad, but I have yet to see a solution to that problem that can be run on a "microserver".

  • I use Hugo for a few sites. Its biggest feature is it generates an entire site in a few seconds, but it's also just a single binary, so it's dead easy to install and runs on Linux/Windows/Mac.

  • Static site generators are currently great for techies needing a simple site. The fact that they pretty much all run on markdown means they won't be adopted by the general public anytime soon. Also, most of them seem to need to compile the entire site from the command line, after every page change.

    I think there's a change brewing - we'll see static generators becoming easier to install and maintain. A full backend dasboard with WYSIWYG editor and image uploader, comprehensive oembed functions, will come along - this year. Remember how Ghost briefly set the cat among the pigeons?

    We'll get dynamic functions, heavily cached, through services like the WordPress REST API. Connector technologies like IFTTT will help form complex chains of events to simplify content acquisition, filtering, publication and sharing.

    Plugins are the elephant in the room - how do we bolt on dynamic content: forums, ecommerce, comments? Maybe we use SaaS solutions (discus, snipcart, etc), and I'm sure the bigger plugins will start to expose their functions through REST APIs too as momentum builds. I like the idea of a small highly optimised static server with a private network link to a more powerful dynamic server. Could make the hacker's job much harder, and I'm soooo fed up of WordPress hacks.

    Thanked by 1jemaltz
Sign In or Register to comment.