Document the mode parameter of slugify Liquid filter
This commit is contained in:
parent
3c5e9f5334
commit
ae57f693e4
|
@ -214,11 +214,27 @@ common tasks easier.
|
|||
<tr>
|
||||
<td>
|
||||
<p class="name"><strong>Slugify</strong></p>
|
||||
<p>Convert a string into a lowercase URL "slug" by replacing every sequence of spaces and non-alphanumeric characters with a hyphen.</p>
|
||||
<p>Convert a string into a lowercase URL "slug".</p>
|
||||
<p>Optional argument mode specify what characters are replaced with a hyphen. The default value is 'default'.</p>
|
||||
<ul>
|
||||
<li>'none': no characters</li>
|
||||
<li>'raw': spaces</li>
|
||||
<li>'default': spaces and non-alphanumeric characters</li>
|
||||
<li>'pretty': spaces and non-alphanumeric characters except for <em>._~!$&'()+,;=@</em></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<p>
|
||||
<code class="filter">{% raw %}{{ page.title | slugify }}{% endraw %}</code>
|
||||
<code class="filter">{% raw %}{{ "The _config.yml file" | slugify }}{% endraw %}</code>
|
||||
</p>
|
||||
<p>
|
||||
<code class="output">the-config-yml-file</code>
|
||||
</p>
|
||||
<p>
|
||||
<code class="filter">{% raw %}{{ "The _config.yml file" | slugify: 'pretty' }}{% endraw %}</code>
|
||||
</p>
|
||||
<p>
|
||||
<code class="output">the-_config.yml-file</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -834,10 +834,14 @@ td {
|
|||
padding: .5em .75em;
|
||||
}
|
||||
|
||||
td p {
|
||||
td p, td ul, article td li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
td ul {
|
||||
padding: 0 0 0 1.2em;
|
||||
}
|
||||
|
||||
th {
|
||||
text-transform: uppercase;
|
||||
font-size: 16px;
|
||||
|
@ -861,7 +865,7 @@ tbody td {
|
|||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1affffff', endColorstr='#00ffffff',GradientType=0 );
|
||||
}
|
||||
|
||||
td p {
|
||||
td p, td ul {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue