Jul 27

Access remote machine with ssh key

This post is going to show a example how you can access a remote linux machine with a ssh client from your local machine. This approach is very common when you want to access or use any port forwarding on a remote machine. Create a ssh-key Start by creating a ssh-key if you don’t already have one on your local machine: ssh-keygen Run the above command and follow the instructions. Default …


Jul 22

Add raw html support for hugo md files

Hugo does not allow to write raw html in markdown files but there is a easy way to enable this with hugo shortcodes. The suggested solution can be found here Create raw html shortcode Create file theme/[your-theme-name]/layouts/shortcodes/ And then you can use the short code in your markdown file e.g: {{< rawhtml >}} <div> <style type="text/css" scoped> button { color: …


Jul 21

Add custom css and js to hugo page

So you have a hugo page or blog post, and you want to add some css or javascript just for that page, below is a way to do that. Introduce front matter Please follow this link where I found this suggestion which is kind of neat. A front matter in hugo is the top part of the .md files. Here you can assign your own parameters that can be used withing your html templates in hugo.


Jul 20

Browse web application from remote server to local client

So lets say you have a case where you do development of a hugo web site on a remote server and when running the preview hugo server -D -p 1313 on the remote server you want to verify the web content on your local client machine by browsing http://localhost:1313 e.g sequenceDiagram Note left of Client: http://localhost:1313 Client->>Remote: ssh -L 1313:localhost:1313 user@server Note right of …


Jul 18

Add mermaid support to hugo code fences

Mermaid js is a visualisation tool commonly used in many web applications. Below is a way to allow code block support for mermaid in hugo markdown files similar to how StackEdit has achieved this. There seems to exists themes in Hugo that supports mermaid such as Learn, but really any theme should be allowed to support this in a easy way. Lets go! Add mermaid support to hugo Below is two ways to …


Jun 16

Setup google cloud build with hugo

When running a hugo web page it makes sense to somehow keep the markdown files version controlled and automatically deployed when changed. My preferred and somewhat lazy way is to use github together with google cloud build automatic deploys. If you as I don’t want to change the markdown files directly in github you could use a editor such as stackedit and connect your github account to the …


© Anis Alekic 2020