During the upcoming AoC I want to post some small posts about each little puzzle. In preparation of this I was looking for a way in hugo to include and highlight source code from GitHub without copying it to each article.

I discovered emgithub and wrote a little shortcode for it and you can find it here.

Copy
# hugo-shortcodes
## emgithub
Embed code from a file on Github directly into your blog using emgithub.com
### Usage
`{{< emgithub user="flipez" repo="battlesnake" file="src/battlesnake/point.cr" >}}`
|Parameter |Default |Required|
|----------|---------|:------:|
|`user` |"" |y |
|`repo` |"" |y |
|`file` |"" |y |
|`branch` |"master" |n |
|`style` |"dracula"|n |
|`lines` |"false" |n |
|`metadata`|"false" |n |
|`border` |"false" |n |
view raw README.md delivered with ❤ by emgithub