i want to understand hugo and improve the docs/code
can anybody answer
why hugo new --kind=% test/test.md
works and what --kind= should be?
Given the files in the archetypes folder:
myarchetype1.md
myarchetype2.mmark
myarchetype3.md
default.md
Some valid examples would be
hugo new --kind=myarchetype1 test/test.md
hugo new --kind=myarchetype2.mmark test/test2.mmark
hugo new --kind=myarchetype3.md test/test3.md
Kind will default to default
if not set, and it will default to “.md” file suffix if not set in kind
.
okay, even more confused now
should --kind check if parameter is valid?
Is that important for your documentation?
Note that documentation is about documenting existing functionality, not some “maybe it should have behaved differently”.
the --help docs says:
-k, --kind string Content type to create
so i expect that when i use (or use it wrong) anything happens
i think it should check for valid (available) Content types?
right now this hugo new --kind="***" test.md
just “works”
Let me know if you have any real questions.
okay, sorry for wasting your time
i read new.go and create/content.go
(i should have done this first, sorry)
real question:
merge?
https://github.com/spf13/hugo/pull/3080
i would prefer to return err instead of only printing