Skip to main

Tag Filters

src/filters/tags.js

Visibility

isPublic()

Return false if a tag name starts with _

Params:

  • tag {string}

publicTags()

Remove private _<name> tags from a list

Params:

  • tags {array}

displayName()

Returns a tag name with private _ removed, for those rare cases where we want to display private tags.

Params:

  • tag {string}

List

getTags()

Returns all tags in a collection

Params:

  • collection {array}

    containing 11ty page objects

tagData()

Returns an array tag-data objects for each tag, including name, url, and page count

Params:

  • collections {11ty collections object}
  • tags {array | 'all'} = undefined

    Will return data for all tags when set to all

See Also