Mappings/dicts are transformed into Nginx blocks. You can nest dicts to nest blocks. The macro will recurse through the nested dicts.
http:
server:
location /: {}
location /api: {}
| {#- | |
| This template attempts to produce an output that conforms to the | |
| notoriously poorly documented "textproto" (human-readable protobuf) | |
| format, as used by Bazel Buildfarm for config files. | |
| #} | |
| {%- macro write_boolean(key, value) %} | |
| {%- if value is sameas true %} | |
| {{ key }}: true | |
| {%- else %} | |
| {{ key }}: false |
| [Desktop Entry] | |
| Version=1.0 | |
| Type=Application | |
| Name=kitty | |
| GenericName=Terminal emulator | |
| Comment=A fast, feature full, GPU based terminal emulator | |
| TryExec=kitty | |
| Exec=kitty | |
| Icon=kitty | |
| Categories=System;TerminalEmulator; |
| # Get Python 3.6: | |
| $ sudo yum -y install centos-release-scl | |
| $ sudo yum -y install rh-python36 | |
| # Install dependencies with yum: | |
| $ sudo yum -y install gcc git harfbuzz harfbuzz-devel zlib libpng libpng-devel freetype fontconfig fontconfig-devel ImageMagick libXi libXi-devel libX11 libX11-devel libXcursor libXcursor-devel libXinerama libXinerama-devel libXrandr libXrandr-devel mesa-libGL-devel libxkbcommon-devel libxkbcommon-x11-devel dbus-devel rh-python36-python-pygments | |
| # Launch new shell with Python 3.6 using SCL | |
| $ scl enable rh-python36 bash |