in src/TemplateRefGenerator/Generators/MarkdownGenerator.cs [158:195]
private static string? GetBicepQuickstartsSection(SamplesFile samples, ResourceMetadata resource)
{
var matchingLinks = samples.QuickstartLinks
.Where(x => x.ResourceTypes.Contains(resource.ResourceType, StringComparer.OrdinalIgnoreCase))
.Where(x => x.HasBicep)
.OrderBy(x => x.Title).ToArray();
if (!matchingLinks.Any())
{
return null;
}
var sb = new StringBuilder();
sb.Append($"""
### Azure Quickstart Samples
The following [Azure Quickstart templates](https://aka.ms/azqst) contain Bicep samples for deploying this resource type.
> [!div class="mx-tableFixed"]
> | Bicep File | Description |
> | ----- | ----- |
""");
foreach (var link in matchingLinks)
{
var bicepUrl = $"https://github.com/Azure/azure-quickstart-templates/tree/master/{link.Path}/main.bicep";
var description = MarkdownUtils.ConvertDocsLinks(link.Description);
sb.Append($"""
> | [{link.Title}]({bicepUrl}) | {MarkdownUtils.Escape(description)} |
""");
}
sb.AppendLine("");
return sb.ToString();
}