HeadTagKey Pennington.Head
Identity used for head deduplication. Two tags with the same key collapse to one — the first contributor to add at a key wins (contributors run lowest-Order first, so page-level beats site-level). Repeatable tags (hreflang, JSON-LD, preloads) opt out by being added with no key via AddRepeatable.
Properties
Valuestring- Stable string identity (e.g.
title,meta:prop:og:image,link:rel:canonical).
Constructors
HeadTagKey
#public HeadTagKey(string Value)
Identity used for head deduplication. Two tags with the same key collapse to one — the first contributor to add at a key wins (contributors run lowest-Order first, so page-level beats site-level). Repeatable tags (hreflang, JSON-LD, preloads) opt out by being added with no key via AddRepeatable.
Parameters
Valuestring- Stable string identity (e.g.
title,meta:prop:og:image,link:rel:canonical).
Fields
TitleHeadTagKey- The singleton document title.
Methods
LinkRel
#public static HeadTagKey LinkRel(string rel)
Builds the key for a singleton link rel (e.g. link:rel:canonical).
Parameters
relstring
Returns
HeadTagKeyMetaName
#public static HeadTagKey MetaName(string name)
Builds the key for a named meta tag (e.g. meta:name:description).
Parameters
namestring
Returns
HeadTagKeyMetaProperty
#public static HeadTagKey MetaProperty(string property)
Builds the key for an OpenGraph/property meta tag (e.g. meta:prop:og:image).
Parameters
propertystring
Returns
HeadTagKeyPennington.Head.HeadTagKey
namespace Pennington.Head;
/// Identity used for head deduplication. Two tags with the same key collapse to one — the first contributor to add at a key wins (contributors run lowest-Order first, so page-level beats site-level). Repeatable tags (hreflang, JSON-LD, preloads) opt out by being added with no key via AddRepeatable.
public struct HeadTagKey
{
/// Identity used for head deduplication. Two tags with the same key collapse to one — the first contributor to add at a key wins (contributors run lowest-Order first, so page-level beats site-level). Repeatable tags (hreflang, JSON-LD, preloads) opt out by being added with no key via AddRepeatable.
public HeadTagKey(string Value)
;
/// Builds the key for a singleton link rel (e.g. link:rel:canonical).
public static HeadTagKey LinkRel(string rel)
;
/// Builds the key for a named meta tag (e.g. meta:name:description).
public static HeadTagKey MetaName(string name)
;
/// Builds the key for an OpenGraph/property meta tag (e.g. meta:prop:og:image).
public static HeadTagKey MetaProperty(string property)
;
/// The singleton document title.
public static readonly HeadTagKey Title
;
/// Stable string identity (e.g. title, meta:prop:og:image, link:rel:canonical).
public string Value { get; set; }
}