Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Add template engine #2

Closed
ddanier opened this issue Feb 18, 2024 · 2 comments
Closed

Idea: Add template engine #2

ddanier opened this issue Feb 18, 2024 · 2 comments

Comments

@ddanier
Copy link
Collaborator

ddanier commented Feb 18, 2024

To create config files for example

Maybe use minijinja

@ddanier
Copy link
Collaborator Author

ddanier commented Apr 1, 2024

I think a template engine should not be part of the nur core for now. The template engine b5 provides (using Jinja2) is mainly used for:

  • Project templates -> nur should not provide something for this, as it is a task runner, not something to setup new projects. There are better alternatives.
  • File templates in install task, for example to create config files -> Simple version of this can be done using format pattern, more complex ones should maybe use some external command

As of this I am closing this issue for now. Maybe the best would be to create a nu plugin to allow the usage of minijinja and thus the usage in nur as well. Depending on nur supporting plugins, of course. Not sure about that either.

In addition I would like to only use minijinja after version 2.0 is ready, see mitsuhiko/minijinja#418 ;-)

@ddanier ddanier closed this as completed Apr 1, 2024
@ddanier
Copy link
Collaborator Author

ddanier commented Apr 1, 2024

Additional note: For config file formats one could also maybe use from yaml and to yaml or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant