@using Statiq.CodeAnalysis
@using Docs.Pipelines
@using Docs.Extensions
@foreach (IGrouping<string, IDocument> typeGroup
    in Outputs.FromPipeline(nameof(Api))
        .Where(x => x.GetBool(CodeAnalysisKeys.IsResult)
                    && x.GetString(CodeAnalysisKeys.Kind) == "NamedType"
                    && Document.IdEquals(x.GetDocument(CodeAnalysisKeys.ContainingAssembly)))
        .GroupBy(x => x.GetString(CodeAnalysisKeys.SpecificKind))
        .OrderBy(x => x.Key))
{
    <h2>@typeGroup.Key</h2>
    @foreach (var type in typeGroup)
    {
        <ul>
            <li>@Context.GetTypeLink(type)</li>
        </ul>
    }
}