As my old WordPress blog running on the domain got hacked and used as a malware delivery site some time ago, the domain is still blacklisted by multiple web protection offerings ran by enterprises. Therefore, I decided to move the blog to a new domain whilst moving away from a full-blown content management system over to a tool building a static website which will be delivered through a webserver.

I decided to use Hugo as a static site generator which is fed by markdown files. To be able to publish new blog posts without having to mess with generating and uploading the generated content to a webserver, I decided to use the Git module of Plesk do automate the deplyoment. The Git extension within Plesk allows other services to trigger an automatic deployment via a webhook. As I mainly host my Git repositories on GitHub (shame on me), it is fairly easy to add the webhook configuration to an existing Git repository.

Git Plesk extension configuration

By using additonal deployment options wihtin Plesk, the Git submodules are initialized which for example include a hugo third part template which is hosted in a dedicatd Git on GitHub. Additionally hugo is triggered to convert the Markdown files into HTML code and to export these generated files in a dedicated folder. The webserver then uses this folder to deliver the website to the clients.

Git automatic deployment options

As I’ve already wrote roughly 40 blog posts within WordPress, I decided to move the content into the new blog. I looked into multiple scripts converting WordPress exports into Markdown files but all of them did not work as flawlessly as hoped. In the end, I decided to manually copy and paste the posts from WordPress over to Markdown files which can then be used by Hugo.