@using Docs.Extensions @using Statiq.CodeAnalysis @{ string title = Document.ContainsKey(Keys.Title) ? $"Spectre.Console - {Document.GetString(Keys.Title)}" : "Spectre.Console"; string description = Document.ContainsKey(Constants.Description) ? Document.GetString(Constants.Description) : "Spectre.Console is a .NET Standard 2.0 library that makes it easier to create beautiful console applications"; var card = Context.FindCard(Model.Id); var urlBase = $"https://{Document.GetString(Keys.Host)}/"; } @title @if (card != null) { }
@RenderSection("header", required: false) @if (!IsSectionDefined("header")) {

@(Document.GetString(Keys.Title) ?? Document.GetTitle())

} @RenderSection("subheading", required: false)
@RenderBody() @{ var referenceLinks = Model.GetList(Constants.ApiReference); if (referenceLinks != null) {

References

    @foreach (var link in referenceLinks) { if (Context.TryGetXrefDocument(link, out var refDoc, out string error)) {
  • @{ var kind = refDoc.GetString(CodeAnalysisKeys.SpecificKind); var prefix = string.Empty; var containingType = @refDoc.GetDocument(CodeAnalysisKeys.ContainingType); if (containingType != null) { prefix = containingType.GetString(CodeAnalysisKeys.DisplayName) + "."; } } @if (!string.IsNullOrWhiteSpace(prefix)){ @prefix}@Html.DocumentLink(refDoc, refDoc.GetString(CodeAnalysisKeys.DisplayName) ?? refDoc.GetTitle()) @kind
  • } else { Context.LogWarning(Model, $"Error finding xref for {link} - {error}"); } }
} }