`hugo new` to create a post is not picking up template in `archetypes/posts.md`

I recently updated my top-level archetypes/posts.md to:

---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
toc: false
commnets: false
images:
tags: 
  - untagged
---

## Introduction

## Table of Content

## Conclusion

I use a similar command as below to create new blog posts:

hugo new content/posts/2020/my-new-post-slug.md

The problem is I don’t see new post with the above template.

I already tried…

I was doubting if this is happening due to that 2020 year after posts archetypes. I have migrated my posts from WordPress which include some posts from previous years. And I want to keep them.

I tried…

  • creating archetypes/2020/posts.md file if that would work.

But that’s not the case. I still don’t see the posts with the new template. Any idea how to deal with this?

drop content

hugo new posts/2020/my-new-post-slug.md

2 Likes

That worked! :heart_eyes:

I always thought argument to new was full path to markdown file. :sweat_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.