CLI command to add new content files

Hey there,

I thought it would be a decent feature to have the option to add content to the project via the cli tool. A few friends/colleges I have introduced to Zola feel the same.

The idea being that you supply the desired path and it creates the subdirectories with their respective file as well as the actual content file. Something like:

zola add -p /sub-folder/my-post -t "My post title"

The -t/–file-title being optional.

I have forked the project, created my own branch and built the feature to see if it would work as I planned.

I am not sure if this is within the scope of the Zola project, open to feedback and would appreciate input.

It’s not going to be added to Zola no, it can be replaced with a cp call and that will be more effective as the front-matter will already have the structure you need.

Ahh okay I understand, I guess It could be extended to use custom defined front-matter templates within the config.toml.

Either way, thanks for the feedback.

That’s partly why I don’t really want to add it. Then you need to add archetypes like Hugo did (maybe still do, I don’t know) and it doesn’t really seem worth the hassle.