# Dates in post filenames

**URL:** https://discourse.gohugo.io/t/dates-in-post-filenames/26219
**Category:** support
**Created:** [June 12, 2020, 6:55pm UTC](https://discourse.gohugo.io/t/dates-in-post-filenames/26219 "2020-06-12T18:55:38Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![zwacky](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwacky/32/12260_2.png) [@zwacky](https://discourse.gohugo.io/u/zwacky)
#### Post date: [August 29, 2020, 2:10pm UTC](https://discourse.gohugo.io/t/dates-in-post-filenames/26219/7 "2020-08-29T14:10:29Z")

</div>

I agree!  
Ultimately I created an npm script for creating new posts. I thought I’d share maybe it helps someone coming across this thread. Doesn’t really matter if you use bash or npm scripts.

```json
{
  "scripts": "hugo new --kind post posts/$(date \"+%F\")-new-post"
}

```

```auto
$ npm run new
/content/posts/2020-08-29-new-post created

```

---

_[View the full topic](https://discourse.gohugo.io/t/dates-in-post-filenames/26219)._
