Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/shortcodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ <h3 id="shortcode">Shortcode</h3>
&lt;li&gt;{{ bird }}&lt;/li&gt;
{% endfor -%}
&lt;/ul&gt;
{% include "_foot.njk %}
{% include "_foot.njk" %}
</pre class="codeexample">

<p>
Edit <span class="path">.eleventy.js</span> by adding the shortcode <span class="var">shorttest</span> after the filter <span class="var">decorate</span>. Note the function accepts two parameters :
</p>
<pre class="codeexample">
eleventyConfig.addShortcode("shorttest", function(subtitle, greeting){
return "&lt;h2&gt;&lt;em&gt;"+subtitle+">&lt;/em>, "+greeting+"&gt;&lt;/h2&gt;
return "&lt;h2&gt;&lt;em&gt;"+subtitle+">&lt;/em>, "+greeting+"&gt;&lt;/h2&gt";
});
</pre>
<p>
Expand Down