When I created an archetype file for my blog posts, what I thought would happen is that the entire file would be copied into the new article, with a date and title added. Instead, the archetype is processed, and the resulting non-empty front matter variables are inserted. No comments, no neatly-formatted front matter, no sample body. It does at least preserve the
<!--more--> separator, but I have a hunch that’s by accident rather than design.
Basically, I wanted this:
+++ date = "(inserted by hugo new)" title = "(inserted by hugo new)" categories = [ "books", "drink", "food", "games", ] # uncomment to add tags # tags = [ "" ] # # uncomment to add to a series # series = [ "" ] # # set to some N for sticky posts # weight = # #remove this to publish draft = true +++ <!--more-->
But I got this:
+++ title = "(inserted by hugo new)" categories = ["books","drink","food","games"] draft = true date = "(inserted by hugo new)" +++ <!--more-->
Instead of being able to quickly edit down the nicely-formatted category list, uncomment a line to add taxonomy references, and see the reminder to delete draft status when I’m ready to publish, I get a blog. [edited: my earlier claim about the body not being preserved was user error; I had conflicting archetype files in the theme and the site]
So, not a bug, just a surprise, and not having a good feel for Hugo’s roadmap (if there is one), all I can really do is ask, “are archetype files useful in their current form?”.