Skip to content

Commit 3bf4cd2

Browse files
authored
chore: Added Base properties AbsoluteLink and RelativeLink (#30)
1 parent ae35525 commit 3bf4cd2

File tree

1 file changed

+32
-0
lines changed
  • src/NetEvolve.ForgingBlazor.Extensibility/Models

1 file changed

+32
-0
lines changed

src/NetEvolve.ForgingBlazor.Extensibility/Models/PageBase.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,36 @@ public abstract record PageBase
6161
Description = "An optional shortened or alternative title used specifically for navigation links and breadcrumbs. When not specified, the main title is used as fallback. Useful for long titles that need truncation in UI elements."
6262
)]
6363
public string? LinkTitle { get; set; }
64+
65+
/// <summary>
66+
/// Gets or sets the absolute URL of the page including the base URL.
67+
/// </summary>
68+
/// <value>
69+
/// The fully qualified URL of the page, including the protocol, domain, and path.
70+
/// This value is automatically set during page processing and includes the complete URL structure
71+
/// (e.g., "https://example.com/blog/my-first-post").
72+
/// </value>
73+
/// <remarks>
74+
/// This property is excluded from YAML serialization and is populated at runtime.
75+
/// It provides the complete URL for use in metadata, canonical links, and social media sharing tags.
76+
/// The absolute URL is constructed by combining the site's base URL with the page's relative path.
77+
/// </remarks>
78+
[YamlIgnore]
79+
public string AbsoluteLink { get; internal set; } = default!;
80+
81+
/// <summary>
82+
/// Gets or sets the relative URL path of the page from the site root.
83+
/// </summary>
84+
/// <value>
85+
/// The site-relative path of the page starting with a forward slash.
86+
/// This value is automatically set during page processing and represents the path portion of the URL
87+
/// without the protocol or domain (e.g., "/blog/my-first-post").
88+
/// </value>
89+
/// <remarks>
90+
/// This property is excluded from YAML serialization and is populated at runtime.
91+
/// It provides the relative path for use in internal navigation, routing, and link generation.
92+
/// The relative URL is derived from the page type and slug, following the site's routing conventions.
93+
/// </remarks>
94+
[YamlIgnore]
95+
public string RelativeLink { get; internal set; } = default!;
6496
}

0 commit comments

Comments
 (0)