这是indexloc提供的服务,不要输入任何密码
Skip to content

saghul/njk

Repository files navigation

njk: powerful portable templating

njk is a single binary command line application designed to provide powerful templating capabilities using environment variables.

Its primary use is to build configuration files at boot time in containerized environments.

njk stands on shoulders of giants. It uses Nunjucks as the templating engine and QuickJS as the runtime. The result is a statically linked binary which is < 1MB.

NOTE: Windows is not currently supported.

Usage

./njk /path/to/template-file.njk > /config/your-config-file

Example:

Hello, {{ env.USER }}

Documentation

Check the Nunjucks documentation on templating.

NOTE: Templates get a single context variable: env containing the environment variables.

Similar tools

About

Powerful portable templating in less than 1MB

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages