Next we script the creation of posts, which sit in a defined directory. This reduces the overhead to running the newpost.ps1 and when edits are complete running the previous up.ps1 command.
$postName = $args[0]
if($postName -eq "") {
"Give the name of the post (no folder data required)."
} else {
hugo new "content/posts/$($postName).md"
code "content/posts/$($postName).md"
}