<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Functions on Hugolify</title><link>https://v1.hugolify.io/docs/codes/functions/</link><description>Recent content in Functions on Hugolify</description><generator>Hugo</generator><language>en</language><atom:link href="https://v1.hugolify.io/docs/codes/functions/index.xml" rel="self" type="application/rss+xml"/><item><title>CorrectPunctuation</title><link>https://v1.hugolify.io/docs/codes/functions/correctpunctuation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1.hugolify.io/docs/codes/functions/correctpunctuation/</guid><description>&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;In french, we need a space before a double punctuation (&lt;code&gt;:;?!&lt;/code&gt;), insecable space allows this punctuation not to be left alone on the line depending on the text, it will always be preceded by a word.&lt;/p&gt;
&lt;h2 id="usage"&gt;Usage&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{{&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;partial&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;func/CorrectPunctuation&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;$string&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="related-links"&gt;Related links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/Hugolify/hugolify-theme/blob/main/layouts/partials/func/CorrectPunctuation" target="_blank" rel="noreferrer noopener" title="« Func file » - external link"&gt;Func file&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>GetFileExtension</title><link>https://v1.hugolify.io/docs/codes/functions/getfileextension/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1.hugolify.io/docs/codes/functions/getfileextension/</guid><description>&lt;h2 id="usage"&gt;Usage&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{{&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;partial&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;func/GetFileExtension&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;$file&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="example"&gt;Example&lt;/h2&gt;
&lt;h3 id="usage-1"&gt;Usage&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{{&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;partial&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;func/GetFileExtension&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;filename.pdf&amp;#34;&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="html-rendered"&gt;HTML rendered&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;&lt;span style="color:#f92672"&gt;abbr&lt;/span&gt;&amp;gt;PDF&amp;lt;/&lt;span style="color:#f92672"&gt;abbr&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="related-links"&gt;Related links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/Hugolify/hugolify-theme/blob/main/layouts/partials/func/GetFileExtension" target="_blank" rel="noreferrer noopener" title="« Func file » - external link"&gt;Func file&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>GetTaxonomyPageBySlug</title><link>https://v1.hugolify.io/docs/codes/functions/gettaxonomypagebyslug/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1.hugolify.io/docs/codes/functions/gettaxonomypagebyslug/</guid><description>&lt;h2 id="arguments"&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;section&lt;/strong&gt; 

 &lt;span class="badge text-bg-light"&gt;String&lt;/span&gt;
 
&lt;br&gt;
Type of request pages&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;taxonomy&lt;/strong&gt; 

 &lt;span class="badge text-bg-light"&gt;String&lt;/span&gt;
 
&lt;br&gt;
Target taxonomy filter&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;slug&lt;/strong&gt; 

 &lt;span class="badge text-bg-light"&gt;String&lt;/span&gt;
 
&lt;br&gt;
The relation value to find (Slug or Title)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;additionalParams&lt;/strong&gt; (optional) 

 &lt;span class="badge text-bg-light"&gt;String&lt;/span&gt;
 
&lt;br&gt;
Where expression additional&lt;/p&gt;
&lt;h2 id="usage"&gt;Usage&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{{&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;partial&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;func/GetTaxonomyPageBySlug&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;$map&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="example"&gt;Example&lt;/h2&gt;
&lt;p&gt;In this example, we want all people with &amp;ldquo;Lorem ipsum&amp;rdquo; as expertise (persons_expertises).&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{{-&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;$pages&lt;/span&gt; &lt;span style="color:#f92672"&gt;:=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;partial&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;func/GetTaxonomyPageBySlug&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;dict&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;section&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;persons&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;taxonomy&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;persons_expertises&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;slug&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;lorem-ipsum&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;)&lt;/span&gt; &lt;span style="color:#75715e"&gt;-}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="related-links"&gt;Related links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/Hugolify/hugolify-theme/blob/main/layouts/partials/func/GetTaxonomyPageBySlug" target="_blank" rel="noreferrer noopener" title="« Func file » - external link"&gt;Func file&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>PrepareHTML</title><link>https://v1.hugolify.io/docs/codes/functions/preparehtml/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1.hugolify.io/docs/codes/functions/preparehtml/</guid><description>&lt;h2 id="actions"&gt;Actions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;safeHTML&lt;/li&gt;
&lt;li&gt;chomp&lt;/li&gt;
&lt;li&gt;&lt;a href="../correctpunctuation/"&gt;CorrectPunctuation&lt;/a&gt; 

 &lt;span class="badge text-bg-light"&gt;Hugolify&lt;/span&gt;
 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="usage"&gt;Usage&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{{&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;partial&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;func/PrepareHTML&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;$string&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="related-links"&gt;Related links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/Hugolify/hugolify-theme/blob/main/layouts/partials/func/PrepareHTML" target="_blank" rel="noreferrer noopener" title="« Func file » - external link"&gt;Func file&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>