Merge pull request #3882 from kazuhitoyokoi/master-addenvinfo2template

Add information about environment variable to template node
This commit is contained in:
Nick O'Leary 2022-09-15 21:24:32 +01:00 committed by GitHub
commit fc3d86e6ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -52,4 +52,7 @@
used to mark the templated sections. For example, to use <code>[[ ]]</code>
instead, add the following line to the top of the template:</p>
<pre>{{=[[ ]]=}}</pre>
<h4>Using environment variables</h4>
<p>The template node can access environment variables using the syntax:</p>
<pre>My favourite colour is {{env.COLOUR}}.</pre>
</script>

View File

@ -48,4 +48,7 @@
<p><b>注: </b>デフォルトでは、<i>mustache</i>形式は置換対象のHTML要素をエスケープします。これを抑止するには<code>{{{三重}}}</code>括弧形式を使います。</p>
<p>もし、コンテンツの中で<code>{{ }}</code>を出力する必要がある場合は、テンプレートで使われる記号文字を変えることもできます。例えば、<code>[[ ]]</code>を代わりに用いるには、テンプレートの先頭に以下の行を追加します。</p>
<pre>{{=[[ ]]=}}</pre>
<h4>環境変数の利用</h4>
<p>templateードでは、次の構文を用いると環境変数にアクセスできます:</p>
<pre>私の好きな色は{{env.COLOUR}}です。</pre>
</script>