Quick guide to tables in Hugo

I had an idea for presenting some language translations in a table. As I’m not very familiar with markdown, I set out to discover how to do it.

It turns out to be simple - just write something like the following in your post markdown:

| Item | Quantity | 
| ---- | -------- | 
| Apples | 12 | 
| Rice | 5 kg bag | 
| Toilet Paper | 1 roll | 

which gives the following output:

Item Quantity
Apples 12
Rice 5 kg bag
Toilet Paper 1 roll

Very nice, and easy peasy. Multiple columns are possible by adjusting the code as you can imagine.

Seems like it’s possible to justify the columns by something like the following, but it doesn’t seems to work (at least for this theme).. I’ll investigate another day.

| Item | Quantity | 
| ---- |:--------:| # center justify
| Apples | 12 | 
| Rice | 1 bag | 
| Toilet Paper | 1 pack | 
| Item | Quantity | 
| ---- | --------:| # right justify
| Apples | 12 | 
| Rice | 1 bag | 
| Toilet Paper | 1 pack | 

Contents