Skip to content

Commit

Permalink
lang.NumFmt was deprecated in Hugo v0.120.0 and will be removed in Hu…
Browse files Browse the repository at this point in the history
…go 0.134.0. Use lang.FormatNumberCustom instead.
  • Loading branch information
yaheya committed Aug 28, 2024
1 parent 8019650 commit e4f877b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions content/post/hugo-stock-summary-shortcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ Create a file called stocks.html and place the following html in it. Save the fi
{{ range index .Site.Data $filename }}
<tr>
<td>{{.name}}</td>
<td>{{lang.NumFmt 2 .value}}</td>
<td>{{lang.NumFmt 2 .change}}</td>
<td>{{lang.NumFmt 2 .percentage}}</td>
<td>{{lang.FormatNumberCustom 2 .value}}</td>
<td>{{lang.FormatNumberCustom 2 .change}}</td>
<td>{{lang.FormatNumberCustom 2 .percentage}}</td>
</tr>
{{end}}
</tbody>
Expand Down
6 changes: 3 additions & 3 deletions layouts/shortcodes/stocks.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ <h3>Market Summary</h3>
{{ range index .Site.Data $filename }}
<tr>
<td>{{.name}}</td>
<td>{{lang.NumFmt 2 .value}}</td>
<td>{{lang.NumFmt 2 .change}}</td>
<td>{{lang.NumFmt 2 .percentage}}</td>
<td>{{lang.FormatNumberCustom 2 .value}}</td>
<td>{{lang.FormatNumberCustom 2 .change}}</td>
<td>{{lang.FormatNumberCustom 2 .percentage}}</td>
</tr>
{{end}}
</tbody>
Expand Down
6 changes: 3 additions & 3 deletions public/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1121,9 +1121,9 @@
{{ range index .Site.Data $filename }}
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;{{.name}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;{{lang.NumFmt 2 .value}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;{{lang.NumFmt 2 .change}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;{{lang.NumFmt 2 .percentage}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;{{lang.FormatNumberCustom 2 .value}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;{{lang.FormatNumberCustom 2 .change}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;{{lang.FormatNumberCustom 2 .percentage}}&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
{{end}}
&amp;lt;/tbody&amp;gt;
Expand Down
6 changes: 3 additions & 3 deletions public/post/hugo-stock-summary-shortcode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ <h5><a class="tag" href='/tags/shortcode'>shortcode</a></h5>
{{ range index .Site.Data $filename }}
&lt;tr&gt;
&lt;td&gt;{{.name}}&lt;/td&gt;
&lt;td&gt;{{lang.NumFmt 2 .value}}&lt;/td&gt;
&lt;td&gt;{{lang.NumFmt 2 .change}}&lt;/td&gt;
&lt;td&gt;{{lang.NumFmt 2 .percentage}}&lt;/td&gt;
&lt;td&gt;{{lang.FormatNumberCustom 2 .value}}&lt;/td&gt;
&lt;td&gt;{{lang.FormatNumberCustom 2 .change}}&lt;/td&gt;
&lt;td&gt;{{lang.FormatNumberCustom 2 .percentage}}&lt;/td&gt;
&lt;/tr&gt;
{{end}}
&lt;/tbody&gt;
Expand Down

0 comments on commit e4f877b

Please sign in to comment.