@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(); try { var markdown = await Http.GetStringAsync("Dashboard.md"); if (!string.IsNullOrWhiteSpace(markdown)) { markdownContent = Markdown.ToHtml(markdown, pipeline); } } catch (HttpRequestException) { markdownContent = "Error loading dashboard content."; } isLoading = false; } }