Is Hugo an open source

WordPress to Hugo

10/22/2018 - Sebastian Pech - ~ 4 minutes

It's been a little over 1.5 years since I migrated a large part of my websites to WordPress. Now six of my website are with Hugo created. There are several reasons for this, as well as a few obstacles.

Hugo

First a short digression about Hugo. This is one static website generator which is written in the Go programming language. In contrast to WordPress, all data and content are in local files and not in a database. The website is made entirely from this data generated. This results in a few advantages. In the loading time of the website, database queries and the generation of the content are eliminated. Static websites are therefore by far in principle more quickly as dynamically generated websites. In addition, static websites are inherent in principle safer. Malicious code cannot simply be injected into the CMS system via security holes. A major disadvantage, however, is that dynamic content more difficult are to be implemented.

Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. (Hugo website)

The pro side

As described above, the websites are mostly initially extremely fast and significantly faster thanks to optimized asset management. Only one theme in my tests uses an external and slow CDN to reload a lot of Javascript files.

By generating the web pages I am now complete independently from the fast moving PHP and the MySQL database. The content is only regenerated locally for new posts and then uploaded (or in the future via my build server).

I can manage all content in a lean and clear manner Markdown files care for. The relevant images for the posts are in the same folder. Each image is saved with its maximum resolution. Shortcodes generate the required sizes while building. This means that there only needs to be one file per project. The perfect resolution is therefore also certain when changing the theme (provided the original was large enough & mldr;).

Any website can be viewed as a whole project on GitHub, Bitbucket, or any other Version control system be versioned. There is therefore automatically a history. With many providers, the Markdown files can also be viewed directly on the website. Theoretically, the content can also be edited in the GitHub Editor. Some projects use this to facilitate the documentation of their software.

I no longer have to deal with constantly updated WordPress Plugins and annoy their references to new Pro versions. Data via my website no longer load from third-party providers. Due to the missing plugins (or their native integration in Hugo), the Footprint significantly smaller despite the many WordPress optimizations. Javascript files from 24 to 1 and CSS files from 15 to 4 on one of my websites.

What speaks against Hugo

In my opinion, Hugo is only for users who are comfortable with files, the command line, version management software and HTML. Of course, a minimal page can be created with a standard theme, but then adjustments are not an option.

Unfortunately, many Hugo themes are a bit older. So they were created before the 0.3 * / 0.4 versions. This means that features such as assets bundles and minification are ** not available **. I had to lend a hand myself with EVERY theme. Some themes did not include the scaling down of images. Other themes lacked basic SEO functions. Often the CSS files were not ** minified ** or several files were included. Bundling is standard with new Hugo versions. The theme has to take this into account.

Conclusion

For technically interested or webmasters who want to build optimal websites, Hugo is an exciting choice. At PageSpeed ​​Insights high scores are guaranteed by Google Developers. With the help of bundling and minification in the new versions, these features are now free of charge without npm, grunt, webpack or other tools. The Toolchain is therefore limited to Hugo and possibly cotinous deployment software such as Jenkins or Deploybot.

WordPress is of course still a good choice for a large number of site operators. However, one should be aware of the weaknesses. A simple landing page does not need a complete CMS and every plugin increases the overhead and the attack surface of a CMS!