Hugo is a website framework to create static web sites. The sites are fast, secure and work on every server.
Static is static. You wont get a nice front- end with a wysiwyg- editor. It’s just plain old markdown, rendered into html. Which leads to some problems if you wanna blog. Or have a webshop…
For the first problem, I found a solution. It’s quite simple if you’re familiar with powershell, but I’m sure you may be able to make something similar in bash. So here’s a little step by step workflow, which I used to blog. But I somehow prefer wordpress. Because of it’s customability with self-written or pre-made plugins.
You write your content like you’re supposed to do and execute a workflow-script.
The basic steps of the workflow are executing hugo and uploading your files.
I even added an additional step. Since my webserver comes with an ssh access and a git client I was able to push-n-pull my website, keeping every version of it into a git repo. There’s an example of how I solved it as featured image or on my github.
(Obviously some parts were removed because of security, like server and git-repo)
1. In the first couple of lines it just creates the website, changes into the public folder and pushes the content to a remote git repo
2. In the part after “git pull over ssh” it checks if your host is already in a session and if not it asks you for the credentials
3. The last part are just some ssh cli commands to change into the webdir of the server and pull the repo
Of course you can simplify this script if you just use ftp, but why make it easier if you can make it more complicated. Well, it’s not really that hard.
Welcome to my Blog, this is the first post.
It’s gonna be a geeky blog, fyi.
I will post some tech- related content in the near future, like:
– tutorials on programming and other computer science stuff
– cool tech- gadgets
– new technologies
Hope you stick here a little and subscribe to this website.