@page "/" @inject HttpClient Http @using Markdig @Localizer["Dashboard"]
@if (isLoading) { } else {
@((MarkupString)markdownContent)
}
@code { private string markdownContent = string.Empty; private bool isLoading = true; protected override async Task OnInitializedAsync() { var pipeline = new MarkdownPipelineBuilder() .UseAdvancedExtensions() .UseEmojiAndSmiley() .Build(); var markdown = await Http.GetStringAsync("Dashboard.md"); if (!string.IsNullOrWhiteSpace(markdown)) { markdownContent = Markdown.ToHtml(markdown, pipeline); } isLoading = false; } }