Closed ashishthedev closed 6 years ago
Do you have a default archetype in your project?
Yes.
.
├── archetypes
│ └── default.md
├── config.toml
├── content
│ └── posts
│ ├── one.md
│ └── two.md
├── data
├── layouts
├── static
└── themes
└── bingo
├── archetypes
│ ├── default.md
│ └── posts.md
├── layouts
│ ├── 404.html
│ ├── _default
│ │ ├── list.html
│ │ └── single.html
│ ├── index.html
│ └── partials
│ ├── footer.html
│ └── header.html
├── LICENSE.md
├── static
│ ├── css
│ └── js
└── theme.toml
Also observed that the front matter is in yaml instead of toml.
Yes.
Then he behaviour is in line with the documentation. Note that this has been discussed before.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Even though I've specified a theme and there is an archetype present for a content-section(posts), but the front matter is not being copied from the theme.
Referring section from docs:
https://gohugo.io/content-management/archetypes/
Step1: Create a new theme:
$ hugo new theme bingo
Step2: Use the theme in config.toml
$ vi config.toml
+++ ... theme = "bingo" +++Step3: create a new archetype posts
$ vi themes/bingo/archetypes/posts.md
+++ fancyOption = "yay" +++Step4: Create a new post
$ hugo new posts/first.md
Step5: Inspect the new file
$ cat content/posts/first.md
$ hugo version
Hugo Static Site Generator v0.30.2 linux/386 BuildDate: 2017-10-27T14:26:46+05:30