Hey 馃憢

I’m Favian and this is my blog where I write about software development. You can find explainers, how-tos, guides, tips & tricks, and anything else I can think of.

How to use JS Interop with Blazor

One of the main benefits of working with blazor is that you can use C# both server side and client side. It allows frontend and backend developers to share a single codebase (something that was only possible with javascript before). This feature is possible because of Web Assembly which gives .NET a low level language to target when compiling C#. One issue with Web Assembly is that it is still in development and doesn鈥檛 have direct access to the DOM like javascript does....

September 19, 2023 路 4 min 路 Favian Flores

How to add a custom 404 error page to a CloudFront website

If you followed my previous post on deploying a static website using S3, CloudFront, and Route53, you might have noticed that if you go to a page that doesn鈥檛 exist, you get a page that looks like this: This is because of the origin access control settings. AWS recommends using origin access control because it allows the S3 bucket containing your website files to restrict access to everyone except CloudFront....

September 18, 2023 路 2 min 路 Favian Flores

How to schedule Hugo deployments with GitHub Actions

In this article I鈥檓 going to show you how to create a GitHub workflow which automatically deploys a hugo website on a set schedule. Add access keys I host this website on AWS CloudFront. In order for GitHub to be able to deploy my website, it needs access to my AWS account. In my last article you learned how to create an IAM user with the necessary permissions for deploying a Hugo website....

September 17, 2023 路 2 min 路 Favian Flores

How to deploy a Hugo website to CloudFront using Hugo Deploy

In this article, I鈥檓 going to show you how to use Hugo鈥檚 built-in hugo deploy command to deploy your site to a CloudFront distribution. You鈥檙e going to learn how to set up an IAM user on AWS, authenticate the AWS CLI, and configure the Hugo CLI so that you can deploy your Hugo website using 1 command. Before you begin, make sure you have a CloudFront distribution with an S3 bucket as an origin....

September 16, 2023 路 4 min 路 Favian Flores

How to deploy a static website using AWS S3, CloudFront, and Route53

In this article, you will learn how to store a static website on S3, use CloudFront as a content delivery network to distribute your website globally, and finally, use Route53 to access your website from a custom domain of your choice. Before you start, you should have the files for your static website and a domain name with a hosted zone on Route53. Ultimately, you will have a website that uses HTTPS, is accessible from a custom domain, and is distributed globally, giving your users faster loading times....

September 15, 2023 路 4 min 路 Favian Flores