{"id":254158,"date":"2026-07-13T03:18:21","date_gmt":"2026-07-13T00:18:21","guid":{"rendered":"https:\/\/1kitap1.com\/en\/beginning-azure-static-web-apps-2e-stacy-cashmore\/"},"modified":"2026-07-13T03:18:21","modified_gmt":"2026-07-13T00:18:21","slug":"beginning-azure-static-web-apps-2e-stacy-cashmore","status":"publish","type":"post","link":"https:\/\/1kitap1.com\/en\/beginning-azure-static-web-apps-2e-stacy-cashmore\/","title":{"rendered":"Beginning Azure Static Web Apps 2E &#8211; Stacy Cashmore"},"content":{"rendered":"<figure style=\"text-align:center;margin:0 auto 1.5em;\"><img decoding=\"async\" src=\"https:\/\/1kitap1.com\/en\/wp-content\/uploads\/2026\/07\/69121a6a13d6a67b.jpg\" alt=\" - Unknown book cover\" style=\"max-width:300px;width:100%;height:auto;box-shadow:0 4px 12px rgba(0,0,0,.25);border-radius:4px;\"\/><\/figure>\n<p>Add the code from Listing 8-12 at the end of the BlogpostSummaries.razor file. Listing 8-12. OnInitializedAsync Code @code { protected override async Task OnInitializedAsync() { await service.LoadBlogpostSummaries(); } } This function is called, as we can see from the name, when the page is initialized. It will fire off a call to the service to fetch the blogposts so that we can use them on the page. While we are waiting for them though, we need to show our users information to let them know something is happening in the background.<\/p>\n<p>12. Add the code from Listing 8-13 after the h1 tags. Listing 8-13. Loading Information for Users @if (service.Summaries is null) { <\/p>\n<div>Loading&#8230;<\/div>\n<p> } Think back to our service. The list of blogpost summaries is not set until we get the data from the API. So as long as it remains null, we know we are loading. When it has loaded, we will have a value for summaries, even if it is an empty list \u2013 so we can make a distinction between the two.<\/p>\n<p>For now, we will just worry about showing the blogposts when they have loaded. Chapter 8 Displaying Data 13. Add the code from Listing 8-14 underneath the code from Listing 8-13. Listing 8-14. Displaying the Titles of the Blogposts else { foreach (var blogpostSummary in \u27a5 service.Summaries.OrderByDescending(bps => bps.PublishedDate)) { <\/p>\n<div>@blogpostSummary.Title<\/div>\n<p> } } This code will run through all the blogpost summaries and put the title on the screen, newest first.<\/p>\n<p>Notice that we don\u2019t need to know when the blogpost summary has a value; Blazor handles all of that automatically for us, so the loading text will disappear and be replaced with the titles. Run the app, start the application in Visual Studio and then start the SWA CLI, and navigate to http:\/\/localhost:4280\/blogposts to see the list of blogpost titles. \u0007Display the Whole Summary That\u2019s a great start, but we want to show a bit more information than that and use it to display the whole post.<\/p>\n<p>To do this, we are going to add to the screen: \u2022 The summary of the blogpost \u2022 The list of tags for the blogpost \u2022 Make it a link to navigate to the full blogpost The summary of our blogpost is Markdown, which is not what we want to display on the screen to the user; we need to convert it to HTML so that the headers, links, etc., show up as we intend them to.<\/p>\n<p>This isn\u2019t something that we are going to make ourselves; we are going to use a well-known tool instead: Markdig.<\/p>\n<blockquote>\n<p>Copyright \u00a9 2026 by Stacy Cashmore This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.<\/p>\n<p>Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.<\/p>\n<p>While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Smriti Srivastava Editorial Project Manager: Jessica Vakili Cover image from Pixabay.com Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza, New York, NY 10004.<\/p>\n<p>Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a Delaware LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail booktranslations@springernature.com; for reprint, paperback, or audio rights, please e-mail bookpermissions@springernature.com. Apress titles may be purchased in bulk for academic, corporate, or promotional use.<\/p>\n<p>eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http:\/\/www.apress.com\/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub https:\/\/github.com\/Apress\/Beginning-Azure-Static-Web-Apps-Second-Edition. For more detailed information, please visit https:\/\/www.apress.com\/gp\/services\/source-code.<\/p>\n<\/blockquote>\n<p><em>This is a short excerpt from the opening of &ldquo;&rdquo; by Unknown, quoted for review and introduction purposes. All rights belong to the copyright holders.<\/em><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/1kitap1.com\/en\/beginning-azure-static-web-apps-2e-stacy-cashmore\/#Book_Information\" >Book Information<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/1kitap1.com\/en\/beginning-azure-static-web-apps-2e-stacy-cashmore\/#Reading_Word_Statistics\" >Reading &amp; Word Statistics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/1kitap1.com\/en\/beginning-azure-static-web-apps-2e-stacy-cashmore\/#Most_Frequent_Words\" >Most Frequent Words<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/1kitap1.com\/en\/beginning-azure-static-web-apps-2e-stacy-cashmore\/#PDF_Download\" >PDF Download<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Book_Information\"><\/span>Book Information<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Unique ID:<\/strong> 69121a6a13d6a67b<\/li>\n<li><strong>File Extension:<\/strong> .pdf<\/li>\n<li><strong>File Size:<\/strong> 18,810,244 bytes (17.939 MB)<\/li>\n<li><strong>Title:<\/strong> &#8211;<\/li>\n<li><strong>Author:<\/strong> Unknown<\/li>\n<li><strong>ISBN:<\/strong> 9798868813207, 9798868813214<\/li>\n<li><strong>Pages:<\/strong> 412<\/li>\n<li><strong>Language:<\/strong> English (en)<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Reading_Word_Statistics\"><\/span>Reading &amp; Word Statistics<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Estimated Reading Time:<\/strong> 368.23 minutes<\/li>\n<li><strong>Total Words:<\/strong> 73,645<\/li>\n<li><strong>Total Characters:<\/strong> 493,179<\/li>\n<li><strong>Average Words per Page:<\/strong> 178.75<\/li>\n<li><strong>Average Characters per Page:<\/strong> 1197.04<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Most_Frequent_Words\"><\/span>Most Frequent Words<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>azure (632), chapter (621), application (521), code (518), listing (492), figure (478), static (397), web (356), need (349), see (344), app (342), blogpost (337), using (333), github (330), page (322), file (314), add (306), api (297), new (296), data (269), use (260), client (256), create (225), click (222), blogposts (221), now (216), function (212), authentication (211), creating (192), project (190), set (181), swa (179), run (178), also (174), going (169), name (166), resource (165), make (164), open (164), https (162), folder (154), cli (154), repository (151), custom (151), visual (147), studio (146), created (140), environment (137), access (131), used (130), available (129), get (128), request (128), book (125), domain (125), look (123), start (119), workflow (115), functions (114), change (113), one (113), com (112), changes (111), first (111), return (111), class (109), tags (109), user (108), screen (107), running (106), http (105), razor (105), information (104), command (104), microsoft (103), list (102), string (98), configuration (96), builder (93), pull (89), author (87), production (87), next (87), public (87), blazor (86), files (85), want (85), browser (84), setting (83), json (82), check (81), time (80), itself (80), private (80), we\u2019ll (79), button (79), deploy (78), end (78), select (78), div (78).<\/p>\n<h2><span class=\"ez-toc-section\" id=\"PDF_Download\"><\/span>PDF Download<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align:center;\"><a href=\"https:\/\/1kitap1.com\/en\/wp-content\/uploads\/2026\/07\/beginning-azure-static-web-apps-2e-stacy-cashmore.pdf\" download rel=\"nofollow\" style=\"display:inline-block;background:#2271b1;color:#ffffff;padding:14px 36px;border-radius:6px;text-decoration:none;font-weight:bold;font-size:1.05em;\">&#11015;&#65039; PDF Download<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Add the code from Listing 8-12 at the end of the BlogpostSummaries.razor file. Listing 8-12. OnInitializedAsync Code @code { protected override async Task OnInitializedAsync() { await service.LoadBlogpostSummaries(); } } This function is called, as we can see from the name, when the page is initialized. It will fire off a call to the service to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":254156,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-254158","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-english"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/posts\/254158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/comments?post=254158"}],"version-history":[{"count":0,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/posts\/254158\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/media\/254156"}],"wp:attachment":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/media?parent=254158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/categories?post=254158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/tags?post=254158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}