hotfix: experimental title fix, telegraf plugin canonical fix

pull/2203/head
Scott Anderson 2021-02-23 13:56:30 -07:00
parent 0fb127cd58
commit e0d6cdd937
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@ menu:
telegraf_1_14:
parent: Plugins
weight: 6
canonical: /{{< latest "telegraf" >}}/plugins/
---
Telegraf is a plugin-driven agent that collects, processes, aggregates, and writes metrics.

View File

@ -24,6 +24,10 @@
{{ $scratch.Set "pageTitle" "" }}
{{ if or (eq $product "platform") (gt (len $productPathData) 2) }}
{{ $scratch.Set "pageTitle" (cond (ne .Params.seotitle nil) .Params.seotitle .Title) }}
<!-- Add Experimental to title if page has experimental in path -->
{{ if and (in .RelPermalink "/experimental/") (eq (len (findRE `[e,E]xperimental` ($scratch.Get "pageTitle") )) 0) }}
{{ $scratch.Set "pageTitle" (print "Experimental " ($scratch.Get "pageTitle")) }}
{{ end }}
{{ end }}
{{ $pageTitle := $scratch.Get "pageTitle" }}