private static string GetJsonQuickstartsSection()

in src/TemplateRefGenerator/Generators/MarkdownGenerator.cs [197:235]


    private static string GetJsonQuickstartsSection(SamplesFile samples, ResourceMetadata resource)
    {
        var matchingLinks = samples.QuickstartLinks
            .Where(x => x.ResourceTypes.Contains(resource.ResourceType, StringComparer.OrdinalIgnoreCase))
            .OrderBy(x => x.Title).ToArray();

        if (!matchingLinks.Any())
        {
            return "";
        }

        var sb = new StringBuilder();
        sb.Append($"""
### Azure Quickstart Templates

The following [Azure Quickstart templates](https://aka.ms/azqst) deploy this resource type.

> [!div class="mx-tableFixed"]
> | Template | Description |
> | ----- | ----- |

""");
        foreach (var link in matchingLinks)
        {
            var templateUrl = $"https://github.com/Azure/azure-quickstart-templates/tree/master/{link.Path}";
            var rawTemplateUrl = $"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/{link.Path}/azuredeploy.json";
            var deployUrl = $"https://portal.azure.com/#create/Microsoft.Template/uri/{Uri.EscapeDataString(rawTemplateUrl)}";
            var description = MarkdownUtils.ConvertDocsLinks(link.Description);

            sb.Append($"""
> | [{link.Title}]({templateUrl})<br><br>[![Deploy to Azure](~/media/deploy-to-azure.svg)]({deployUrl}) | {MarkdownUtils.Escape(description)} |

""");
        }

        sb.AppendLine("");

        return sb.ToString();
    }