Hugo Alias

Creating a new page bundle in hugo is such a long command:

hugo new --kind post-bundle posts/my-post

So I created an function in bashrc to alias that command. It needs to be a function because you can’t pass in parameters to an alias (as far as I know).

#Hugo alias for new page bundle
function post { hugo new --kind post-bundle $1; }
export -f post

So now I can create a post like this:

post notes/my-post