.Site.Data.Tags - A first test

tbd: include test results

range $tag, $options := .Site.Data.tags

about -
{"Active":true,"Description":["Pages that give sidewide a bit more info"],"Instagram":"https://www.instagram.com/about/","Title":"About","Website":null,"Weight":1}


data -
{"Active":true,"Description":["Data fron JSON, YAML, ..."],"Facebook":"https://www.facebook.com/test","Instagram":null,"Title":"Data","Website":"https://www.google.com/search?q=gohugo+data+json+yaml","Weight":10,"icon":"/fontawesomeicons/1687991370258.png"}


empty -
{}


goal -
{"Active":true,"Description":["If this works, I will be happy !"],"Title":"Goal of this test","Website":"https://www.google.com/search?q=goal","Weight":20,"icon":"/fontawesomeicons/1687991394642.png"}


nok -
{"Active":true,"Description":["not ok - a bit like draft","in production this tag shoukd not be visible"],"Facebook":"https://www.facebook.com/nok","Instagram":null,"Title":"NOK","Website":"https://www.google.com/search?q=nok","Weight":5}


notused -
{"Active":true,"Description":["For this tag there is a data yaml file, but the tag is not used on the site","This is the inverse of the tag thistagwillnothaveadatayamlfile"],"Facebook":"https://www.facebook.com/notused","Instagram":null,"Title":"NotUsed","Website":"https://www.google.com/search?q=not+used","Weight":5}


overview -
{"Active":true,"Description":["Let's start here"],"Title":"Overview","Weight":100}


sitedatatags -
{"Active":true,"Description":["you are looking at it = extra Tag info fron data files"],"Facebook":"https://www.facebook.com/test","Instagram":null,"Title":"Site Data Tags","Website":"https://www.google.com/search?q=gohugo+taxonomy+data","Weight":10,"icon":"/fontawesomeicons/1687991370258.png"}


test -
{"Active":true,"Description":["Test test test and more tests"],"Facebook":"https://www.facebook.com/test","Instagram":null,"Title":"Test","Website":"https://www.google.com/search?q=test","Weight":10,"icon":"/fontawesomeicons/1687991370258.png"}


uniq -
{"Active":true,"Description":["hugo has an uniq function, but no uniq+count"],"Facebook":"https://www.facebook.com/test","Instagram":null,"Title":"Uniq and count","Website":"https://www.google.com/search?q=gohugo+uniq+count","Weight":10,"icon":"/fontawesomeicons/1687991370258.png"}


from layouts/_default/terms.html

uniq (5)

Data (4)

sitedatatags (4)

test (3)

debug (1)

table (1)

from layouts/_default/terms.html + if .Count > 1

Data (4)

sitedatatags (4)

test (3)

uniq (5)

if (hasPrefix .Page.Title "model")

range .Site.Params.specialPages

range .Site.Taxonomies.tags

uniq - 5 - https://b2t.be/tags/uniq/

sitedatatags - 4 - https://b2t.be/tags/sitedatatags/

Data - 4 - https://b2t.be/tags/data/

test - 3 - https://b2t.be/tags/test/

table - 1 - https://b2t.be/tags/table/

debug - 1 - https://b2t.be/tags/debug/

range .Site.Taxonomies.tags + if (gt .Count 1 )

uniq - 5 - https://b2t.be/tags/uniq/

Data - 4 - https://b2t.be/tags/data/

sitedatatags - 4 - https://b2t.be/tags/sitedatatags/

test - 3 - https://b2t.be/tags/test/

if in .Site.Params.specialPages "work"

false

if in .Site.Params.specialPages $work

false

range .Site.Taxonomies.tags + if (gt .Count 1 )

uniq - 5 - https://b2t.be/tags/uniq/ - = string - string - string - string

Data - 4 - https://b2t.be/tags/data/ - = string - string - string - string

sitedatatags - 4 - https://b2t.be/tags/sitedatatags/ - = string - string - string - string

test - 3 - https://b2t.be/tags/test/ - = string - string - string - string

range .Site.Taxonomies.tags + .Param specialPages

uniq - 5 - https://b2t.be/tags/uniq/ - = string - string - string - string

Data - 4 - https://b2t.be/tags/data/ - = string - string - string - string

sitedatatags - 4 - https://b2t.be/tags/sitedatatags/ - = string - string - string - string

test - 3 - https://b2t.be/tags/test/ - = string - string - string - string