Adding Password Protection To A Hugo Post

In this post, I’ll show you the simplest way to protect a Hugo page with a password by using front matter and adding a new parameter called “password.” This allows you to set a unique password for each post. proceed with caution This method lacks complete security. Anyone with basic Hugo knowledge can access your repository and view the passwords. Therefore, it’s advisable to avoid sharing sensitive information using this approach.

Add Lunr Search to Hugo site

What’s covered in this post? Hugo ships with out search, yet I love it. However, I’ve managed to integrate lunr search that is supported by the theme Loveit I’m using on this website. With that being said, this post will cover how I integrate lurn on my website - for demo, go ahead and search for something on this website :) Install or update! Make sure you update or install before we start.

String Template in Java 21

What is String Template? String Template is a process of substituting values of variables into placeholders in a string. In the past, we relied on string concatenation to format output for print statements. System.out.println(arr[i] + " " + "From for loop"); Now this will change from Java 21 as String Template is here. String templates offer a more elegant approach by letting you embed expressions directly within the string. This improves readability and maintainability of your code.

Calculate Anual Rate Of Return In Python

Hey there! We’re going to work on a challenge together where we’ll be writing a program called The goal of this program is to track the growing amount of an investment over time. We’ll start with an initial deposit, also known as the principal amount. Each year, this amount will increase by a fixed percentage called the annual rate of return. For instance, if we start with a principal amount of $100 and an annual rate of return of 5%, the first year’s increase will be $5.