pietroppeter / nimib

nimib 🐳 - nim 👑 driven ⛵ publishing ✍
https://pietroppeter.github.io/nimib/
MIT License
175 stars 10 forks source link

💮stampino: a Nimib based cookie cutter #115

Open pietroppeter opened 1 year ago

pietroppeter commented 1 year ago

having done twice (nimib, nimibook) the operation of adding PR deploy preview with Netflix, and counting that it will be useful for other projects (I will likely need to do it at least once more within the month), I plan to create as a nimib side project stampino.

The idea is to have a nimib based cookie cutter ("stampino" is a possible italian translation of cookie cutter). Not that I actually know very much about cookie-cutter itself (used it twice years ago), but the idea is to have a way to add folders and documents starting from templates and it seem that does just that (although cookie-cutter seems to focus on projects). First target would be to add some common GitHub actions for nimib based projects but it could be used in more ways than that.

As an initial design idea, stampino would come with a set of predefined "stampini" (set of templates), initially some common nim/nimib actions, but in principle it could be extended by pointing to a given folder or repo or folder in a repo. Context content would initially come from a [stampino] section in nimib.toml.

It would also be an experiment in using nimib for a different use case than producing documents.

💮 is also known as well done stamp: https://www.floom.com/us/magazine/article/world-emoji-day

HugoGranstrom commented 1 year ago

I will likely need to do it at least once more within the month

Smells like a new nimib theme is coming soon :open_mouth:

I really like the idea of having a template to make new nimib themes, but I'm not really following how you will use nimib for this. It feels like this is just some makedir + writeFile action going on to create the files, nothing that nimib itself is needed for.

pietroppeter commented 1 year ago

Smells like a new nimib theme is coming soon 😮

yes, the idea is to work on #77 (once I have completed ongoing stuff)

I really like the idea of having a template to make new nimib themes, but I'm not really following how you will use nimib for this. It feels like this is just some makedir + writeFile action going on to create the files, nothing that nimib itself is needed for.

yes, it is probably not much more than that, but you will also need to substitute some names (netlify site name) or parts of document so some templating could be useful. It might indeed be that nimib is not a good fit and I am wasting a good name and emoji for that... :)

HugoGranstrom commented 1 year ago

yes, the idea is to work on https://github.com/pietroppeter/nimib/issues/77 (once I have completed ongoing stuff)

Oh la la, then I could finally migrate my blog to nimib :star_struck: (It's based on Jekyll at the moment I think)

yes, it is probably not much more than that, but you will also need to substitute some names (netlify site name) or parts of document so some templating could be useful. It might indeed be that nimib is not a good fit and I am wasting a good name and emoji for that... :)

I think I'm just not seeing the same usage as you. Will this be a binary that you call like stampino github-actions or will you import it in a file and choose the templates there and then run that?

import stampino
setupGithubActions()
pietroppeter commented 1 year ago

Will this be a binary that you call like stampino github-actions or ...

A binary

HugoGranstrom commented 1 year ago

A binary

Ok :+1: I've come around and making use of nimib's ability to understand the structure of a nimib project does make sense to facilitate. And in theory nbFile could be used to create the needed files...