Rename files (content/*.md)

Is there any cli command to rename all content files to Y-m-d_slug.md ?

If not it is my suggestion to create.

That’s the job of utility commands like mv, which I suggest you use for that purpose. It has nothing to do with Hugo

that’s right. but also it would be usefull if hugo has.
making php script file for it :stuck_out_tongue:

if someone need this I’ve published gist.

copy this script to hugo content/posts folder and run php rename_files.php and you will get nicely named files with date prefix

.p.s. I still think hugo should have this functionality

2 Likes

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