Host a Hugo website on Github pages

GitHub pages is a very simple way to host a static website. You can simply commit your html static page and GitHub will serve it as a static content from a github subdomain using your username. You can even setup your own custom domain if you own one. The question is how can I host a static website that is generated like Hugo - for people who don’t know, Hugo is a very light and flexible static site generators....

January 1, 2023

Property Initialization in C#

Properties in C# is a very convinient way to write code. A property can be initialized to a default value with the following: public MyClass Item { get; } = new MyClass(); The Item property is initialized with a new instance of MyClass each time we access this property we will get the same instance of the class. However when writing the following code: public MyClass Item => new MyClass(); In that case the Item property is not initialized with any value, instead each time we access the Item property, the getter will return a new instance of MyClass....

June 29, 2022