From cfc61e7ee814c86f9261d4735540d9c27ebac36b Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Fri, 20 Dec 2024 11:14:37 +0530 Subject: [PATCH 1/2] Minor fixes for Yesod typeclass chapter --- book/asciidoc/yesod-typeclass.asciidoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/book/asciidoc/yesod-typeclass.asciidoc b/book/asciidoc/yesod-typeclass.asciidoc index ad15b31..9b5dec2 100644 --- a/book/asciidoc/yesod-typeclass.asciidoc +++ b/book/asciidoc/yesod-typeclass.asciidoc @@ -47,7 +47,7 @@ still need to deal with ports. And even if we get the port number from the request, are we using HTTP or HTTPS? And even if you know _that_, such an approach would mean that, depending on how the user submitted a request would generate different URLs. For example, we would generate different URLs -depending if the user connected to "example.com" or "www.example.com". For +depending on if the user connected to "example.com" or "www.example.com". For Search Engine Optimization, we want to be able to consolidate on a single canonical URL. @@ -368,13 +368,13 @@ In fact, you could even use special responses like redirects: NOTE: Even though you _can_ do this, I don't actually recommend such practices. A 404 should be a 404. -=== External CSS and Javascript +=== External CSS and JavaScript NOTE: The functionality described here is automatically included in the scaffolded site, so you don't need to worry about implementing this yourself. One of the most powerful, and most intimidating, methods in the Yesod typeclass is +addStaticContent+. Remember that a Widget consists of multiple components, -including CSS and Javascript. How exactly does that CSS/JS arrive in the user's +including CSS and JavaScript. How exactly does that CSS/JS arrive in the user's browser? By default, they are served in the ++ of the page, inside +