Open robertpi opened 4 years ago
This is interesting - Fornax itself is just an engine, all generation logic is in loaders and generators. So I'm not sure if it should add any hardcoded file templates - those may work for built-in blog template but may be totally useless when someone customizes their loaders.
A more interesting idea would be giving templates (like our blog template) a possibility of defining items that could be generated. So for example in Saturn repo I could add how-to
or explanation
item template and then use that in this particular repo.
I do believe that’s how it’s implemented in Hugo. The archetypes are basically a file within a template that the cli duplicates. It would also probably be good to introduce an option to do something like fornax new $template
I've dealt with this using a new-post script which I invoke with dotnet fsi new-post.fsx Some interesting new post
- it seems to me that there is value in having a built in template solution if only because I felt the need to roll my own. More so if you want to broaden use
Yeah, seems like having a way for fornax to invoke a script similar to the one @recumbent wrote might be a good way to solve this? Or maybe invoking a script from fsi is good enough and it doesn't need to be put in fornax itself, perhaps just provide a example script with the template?
Is your feature request related to a problem? Please describe. In Hugo archetypes are templates for .md files that will be created in the posts directory. They make it easy not new post, for example helping to structure the url consistently.
Describe the solution you'd like Command line something like:
template would be kept in "archetypes"
I would be will to implement this, but wanted discuss the solution before starting.