Backdrop is already fast, but what if it could be faster?

I currently maintain a few static HTML sites through Dreamweaver's template system.  I've considered moving them to a CMS like Backdrop, but for these small simple sites, it seems overkill.  I started looking at static site generators like Huge, Couscous, etc..  My problem with these is the engine used is based on a template language like twig or smarty.   I was hoping that I could find something that is 100% PHP, since PHP (in addition to being an awesome general purpose language) can also be a great template language (that was it's original design goal).

That got me thinking, what if Backdrop (since it uses PHP templates) could generate a static version of the site like the site generators I mentioned above?  

The way I imagine it working is that once you have a functional site, there is a command line tool you would run to generate an HTML version of the site and assets into a folder specified.

Comments

klonos's picture

Hello  👋

Generating a static version of very simple Drupal/Backdrop sites may work, but things get complicated when requiring functionality like allowing people to add comments, searching, dynamically-generated views listings that may optionally allow sorting/filtering (recent content, recent comments etc.)

The way I see it, such simple sites that do not require any of that, are better off as actual static sites - I wouldn't see any point in having a CMS "behind the scene".

Having said the above, have you looked at these contributed modules:

 

None of them has been ported to Backdrop yet though. I would suggest that you try them out in Drupal, and if they work as expected for you, then add a request in https://github.com/backdrop-ops/contrib/issues. If enough people want this, then these modules may get ported.

Another resource that you may find useful is Creating a static archive of a Drupal site.

Finally have you checked any 3rd party services such as https://www.quantcdn.io which generates a static version of your Drupal site + allows search/forms etc.? (disclaimer: the company I work for is behind that)