Tangible Bytes

A Web Developer’s Blog

Hugo Markup Attributes

I have been blogging since about 2005 and been through several different platforms in the process

Using a Static Site Generator with content in Markdown is awesome for low maintenance and content portability.

If I move platform it shouldn’t be hard to migrate the content and to that end I want to keep the my posts fairly pure Markdown - but it can be a bit limited.

How do I add some classes to change how it looks?

Read more ...

Firebase Hosting

Website developers (like myself) often end up with a few websites we support - whether these are promoting a business, running a blog, for a side project, or a site for a friend or hobby.

Since these are often low to no budget and can’t be prioritised for work at busy times they need to be

  • cheap
  • low maintenance
  • easy to set up
  • blazingly fast
Read more ...

PWA, Workbox, CSP, and Caching

In the world of Web development the words “Best Practice” are often thrown about as if implementation was a trivial detail and giving the impression that everyone else must be doing all this already.

Then you implement these and find that it isn’t so trivial - especially when you try and combine each practice.

I wanted to experiment with making this site into a Progressive Web App (PWA) while maintaining good security through Content Security Policy (CSP) headers and long cache times for static assets.

Read more ...

Hugo and Webpack

Hugo - The world’s fastest framework for building websites is pretty awesome. It’s what I use to manage this site.

But much of the web development world has moved in the direction of JavaScript, npm, and Webpack.

So how can you run a Hugo website and manage the embedded JavaScript and CSS that are most commonly managed with npm and Webpack?

Read more ...

Hugo Shortcode

I wanted to use an html <aside> block in my blog and this isn’t supported by Markdown

It’s fairly easy to implement as a hugo shortcode though

I created a file (path from the root of my hugo site)

layouts/shortcodes/aside.html

Read more ...