Posts
2023
How to Setup the Official Hugo Module for Bootstrap 5 SCSS and JS
·468 words·3 mins
hugo
To get started with the Hugo Bootstrap module, follow these simplified steps:
Step 1 - Initialize Your Project as a Hugo Module # Open your terminal. Use the command hugo mod init github.
How to Rename a Batch of Files in Numbered Sequence
·356 words·2 mins
bash
bash script
rename
To rename files in numbered sequence, use a simple Bash script in the directory.
#!/bin/bash # Step 1: Choose a prefix read -p "Choose a prefix: " prefix # Initialize a counter i=1 # Step 3: Use a for loop to iterate through the files for file in *; do # Step 4: Use the mv command to rename and printf to format mv "$file" "$(printf "$prefix"_%03d.
How to Add Google Analytics to a Hugo Site
·264 words·2 mins
google analytics
hugo
Assuming you’ve already set up a Google Analytics account, here’s how you add it to your Hugo site. (If not then, see this post for instructions.)
Setting up Google Analytics in your Hugo site is extremely simple.
How to Create a Gitignore File for a Hugo Site
·338 words·2 mins
git
Creating a useful gitignore file means you understand the hugo directory structure.
At the very least, a .gitignore file for a Hugo site should contain these lines:
/public/ /resources/ .hugo_build.lock When you create a hugo site, it will create the following file structure in your project:
Upgrading Hugo on Linux: A Step-by-Step Guide to Any Version You Need
·631 words·3 mins
hugo
Before we dive into the details, here’s the code you’ll need to upgrade Hugo to a specific version using dpkg:
# Uninstall the existing Hugo version sudo apt autoremove hugo # Download your desired Hugo version from the Hugo releases page, e.