Pipe:
export TITLE=world
echo "Hello " | orninject
$ Hello World
Pipe write:
export TITLE=Hello world
cat index.html
$ <h1></h1>
cat index.html | orninject > index.html
cat index.html
$ <h1>HELLO WORLD</h1>
File index.html
:
<h1></h1>
Command:
export TITLE=Hello world
orninject replace index.html
New index.html
content:
<h1>HELLO WORLD</h1>
File index.html
:
<h1></h1>
<h2></h2>
Command:
export TITLE=Hello world
orninject replace index.html
New index.html
content:
<h1>Hello world</h1>
<h2>Default Var Value</h2>
Orninject use text/template and Sprig lib to provide more template features.