Attachments hugo.png (17 KB) MaybeTreasure.txt (23 B) NoTreasure.en.txt (23 B) Treasure.pir.txt (31 B) Usage While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' also call this shortcode from yer own partials.
Attachments hugo.png (17 KB) MaybeTreasure.txt (23 B) NoTreasure.en.txt (23 B) Treasure.pir.txt (31 B) Usage While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' also call this shortcode from yer own partials.
<p>Th' <code>resources</code> shortcode displays th' <ahref="https://gohugo.io/methods/resource/title/"target="_blank">titles</a> o' resources contained 'n a <ahref="https://gohugo.io/content-management/page-bundles/"target="_blank">plank bundle</a>.</p>
<p>Multilanguage features be not supported directly by th' shortcode but rely on Hugo’s handl'n fer resource translat'ns applied when th' theme iterates over all avail'ble resources.</p>
<h3id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>style</strong></td>
<td><code>transparent</code></td>
<td>Th' style scheme used fer th' box.<br><br>- by severity: <code>info</code>, <code>note</code>, <code>tip</code>, <code>warning</code><br>- by brand color: <code>primary</code>, <code>secondary</code>, <code>accent</code><br>- by color: <code>blue</code>, <code>green</code>, <code>grey</code>, <code>orange</code>, <code>red</code><br>- by special color: <code>default</code>, <code>transparent</code>, <code>code</code></td>
</tr>
<tr>
<td><strong>color</strong></td>
<td>see notes</td>
<td>Th' <ahref="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value"target="_blank">CSS color value</a> t' be used. If not set, th' chosen color depends on th' <strong>style</strong>. Any given value will overwrite th' default.<br><br>- fer severity styles: a nice match'n color fer th' severity<br>- fer all other styles: th' correspond'n color</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td>see notes</td>
<td>Arbitrary text fer th' box title. Depend'n on th' <strong>style</strong> there may be a default title. Any given value will overwrite th' default.<br><br>- fer severity styles: th' match'n title fer th' severity<br>- fer all other styles: <code>Resources</code><br><br>If ye want no title fer a severity style, ye have t' set this parameter t' <code>""</code> (a non empty str'n filled wit' spaces)</td>
</tr>
<tr>
<td><strong>ay'con</strong></td>
<td>see notes</td>
<td><ahref="/hugo-theme-relearn/pir/shortcodes/icon/index.html#finding-an-icon">Font Awesome ay'con name</a> set t' th' left o' th' title. Depend'n on th' <strong>style</strong> there may be a default ay'con. Any given value will overwrite th' default.<br><br>- fer severity styles: a nice match'n ay'con fer th' severity<br>- fer all other styles: <code>paperclip</code><br><br>If ye want no ay'con, ye have t' set this parameter t' <code>""</code> (a non empty d wit' spaces)</td>
</tr>
<tr>
<td><strong>sort</strong></td>
<td><code>asc</code></td>
<td>Sort'n th' output 'n <code>asc</code>end'n or <code>desc</code>end'n order.</td>
</tr>
<tr>
<td><strong>pattern</strong></td>
<td><code>.*</code></td>
<td>A <ahref="https://en.wikipedia.org/wiki/Regular_expression"target="_blank">regular expressions</a>, used t' filter th' resources <ahref="https://gohugo.io/methods/resource/name/"target="_blank">by name</a>. For example:<br><br>- t' match a file suffix o' ‘jpg’, use <code>.*\.jpg</code> (not <code>*.\.jpg</code>)<br>- t' match file names end'n 'n <code>jpg</code> or <code>png</code>, use <code>.*\.(jpg|png)</code></td>
</tr>
</tbody>
</table>
<h2id="examples">Examples</h2>
<h3id="custom-title-list-of-resources-ending-in-png-jpg-or-gif">Custom Title, List o' Resources End'n 'n png, jpg or gif</h3>
<divclass="highlight wrap-code"><pretabindex="0"class="chroma"><codeclass="language-go"data-lang="go"><spanclass="line"><spanclass="cl"><spanclass="p">{{</span><spanclass="o">%</span><spanclass="nx">resources</span><spanclass="nx">color</span><spanclass="p">=</span><spanclass="s">"fuchsia"</span><spanclass="nx">ay'con</span><spanclass="p">=</span><spanclass="s">"fa-fw fab fa-hackerrank"</span><spanclass="o">/%</span><spanclass="p">}}</span></span></span></code></pre></div>
<h3id="style-color-title-and-icons">Style, Color, Title an' Ay'cons</h3>
<p>For further examples fer <strong>style</strong>, <strong>color</strong>, <strong>title</strong> an' <strong>ay'con</strong>, see th' <ahref="/hugo-theme-relearn/pir/shortcodes/notice/index.html"><code>notice</code> shortcode</a> documentat'n. Th' parameter be work'n th' same way fer both shorrrtcodes, besides hav'n different defaults.</p>