/ #c9.io #blog 

Blogging hugo on the cloud

Hugo is a nice site generator which can be used for blogging (Read here why i recently switched to it). However, it requires a go program to run and generate the files - something i cannot do easily on my android tablet…

Cloud to the rescue

Back in 2014 I noticed the existence of Cloud IDEs like c9.io. It’s a full blown IDE accessible from your Browser. It comes with access to a small linux container to run your stuff, which is fired on automatically, when you are on the project (in the higher plans you can also have permanent ones, and you are also able to connect your own).

It might not be perfect for everything, but for smaller projects it seems sufficient. As it has nice support for Go and Markdown files, it might be the perfect match for writing my Blog.

Create c9.io project

The setup is quite easy - just login (for example via github OAUTH), create new project (one private is free), enter the github url of your blog sources and then wait 2-3 Minutes while the container powers up.

update: Just realized that c9.io is not there anymore :D the old Accounts still work (and claims to be free forever) and if you use link directly to login it will look all the same. But in the meantime it got aquired by amazon aws :). Will checkout how it works there / how it changed and update article then.

Install hugo

Go comes pre-installed, so we just need to download hugo binary from here (take the linux 64bit .deb file).

And then rum sudo dpkg -i hugo-blablaversion.deb (Yes, you have sudo rights on the container yay)

Afterwards you could fire up “hugo serve” from the console window, but there’s an even better way:

Hugo Run configuration

Go to “run” -> “Run configurations” and edit a new run configuration as follows:¨

hugo serve --baseURL=https://<your-project-name>-<your account name> --bind=$IP --port=$PORT

Then just save it and hit the run button.

Once it’s running, you can surf to the url you entered or hit the preview button to see a preview of your blog :)

And that's how it looks like
And that's how it looks like

What might be problematic though is the internet connection. Let’s see how it will work out on the train.

Alternatives

Linux On Dex

I was playing around with Linux on Dex a bit today. Looks promising - full (well almost) Linux on my Samsung tablet. There I could even run my beloved WebstormIDE. I will write a bit more about it shortly.

VNC/RDP

Of course you can just login remotely to your computer and work on that. Will check out how it compares in terms of performance, battery, etc.

Conclusion

A browser is enough, blog from anywhere, just pick up where you left. Tempting setup, let’s see if it can make me happy long term.


Sources:

Author

JBrosi

Passionate coder; discovered the black magic of writing programs in the age of 13 and still loving it. When not fighting with bits & bytes probably seen outside with a camera.