Before proceeding with the steps below, make sure that you have Git Bash installed on your computer.
If not, you can download it here: Download Git Bash
Create a new directory on your computer. I’m naming it as WORKSHOP.
Copy your Hugo Source Code folder into the WORKSHOP directory.
Here we are using a Sample Source Code. You can Download the Sample Source Code, then unzip it into the WORKSHOP directory with the name 000058-SessionManager
Navigate into the 000058-SessionManager directory
Right-click in an empty area of the folder, then choose Git Bash Here
The Git Bash interface will appear. Press the Windows key along with the right arrow 🡒 or left arrow ⭠ to split the screen into two windows.
On the right is the Git Bash window, and on the left is the 000058-SessionManager directory for easier operations in the following steps. (This is optional)
head -10 config.toml
relativeURLs=true
attribute to the first line of the config.toml filesed -i '1 i\relativeURLs = true' config.toml
relativeURLs = true
attribute in the first linehead -10 config.toml
hugo
Adding the relativeURLs = true
attribute to the first line of the config.toml file is the key step of this Lab.
It will update all resource paths like css, images, … to relative paths, ensuring correct resource retrieval later.