Merge pull request #125 from TheDoubleH/InstallHugoOnWindows11

Install hugo on windows11
This commit is contained in:
Henrik Helgesen 2022-02-25 08:46:22 -08:00 committed by GitHub
commit 80b377d382
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 90 additions and 1 deletions

View file

@ -26,3 +26,4 @@ When `begin` follows `then`, `else`, `do`, it should be on the same line, preced
... ...
end; end;
``` ```

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -0,0 +1,57 @@
---
title: "Manually on Windows 11"
---
This guide will walk You thrugh installing Hugo on a Windows 11 PC. For the official install guide, You can wisit <https://gohugo.io/getting-started/installing/>.
## Download Binaries
The path of least resistance is to just download the .zip file from the official Hugo GitHub Repository [here](https://github.com/gohugoio/hugo/releases).
The theme that are used, needs the extended version of Hugo, so make sure to download the **extended** version by ensuring the file name starts with `hugo_extended...`
{{% alert title="info" color="info" %}}
For the purpose of this install guide, we are assuming You will want to follow the "standard" used by Hugo for installing. We will be creating a `Hugo` folder in the root of `C:\`. That folder will have a `Bin` folder for the binaries, and a `Sites` folder for each website You are building.
Once You are done, You should have a folder structure that looks like this:
```text
C:\Hugo
├── Bin # Binaries
└┬─ Sites # Hugo Site Repositories
└── alguidelines # Hugo Source for alguidelines.dev
```
{{% /alert %}}
![image](SelectExtended.png)
After downloading the .zip file, extract the zip-file to `c:\Hugo\Bin`
![image](Extract.png)
![image](ExtractToBin.png)
## Add Hugo to Path
After copying the binaries to Your PC, You will need to add Hugo binaries to the `%PATH%` system environment variables.
To do that, search for `environment`
![image](SearchForEnv.png)
once you see the `Edit the system environment variables`, open it and select `Environment Variables`
![image](SystemProperties.png)
Once the Environment Variables screen is open, highlight the `Path` lines and press the `Edit...` button
![image](EnvironmentVariables.png)
Now press `New` and add the `C:\Hugo\Bin` to the path. Press `OK` and `OK` to save the new `Path`
![image](EnvironmentVariablesPath.png)
Once complete. You should now be able to preview the Hugo site on <http://localhost:1313> by opening a command promt, and open the `C:\Hugo\Sites\alguidelines` folder and execute `Hugo Serve`
![image](HugoServe.png)

View file

@ -0,0 +1,22 @@
---
Title: Powershell on Windows 11
description: >
Install Hugo with a simple Powershell Script and chocolatey
---
It is possible to use a powershell script and Chocolatey to install and other dependencies. Execute the following script:
```powershell
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install -y nodejs
choco install -y hugo-extended
```
Once complete, in root of of the repository execute the following commands
```powershell
git submodule update --init --recursive --depth 1
npm install
```

View file

@ -0,0 +1,9 @@
---
title: Install Hugo
---
There are multiple ways to install Hugo for you to properly preview your contributions. Please select the scenario that matches your setup.
For the official install guide, you can visit <https://gohugo.io/getting-started/installing/>
{{< youtube G7umPCU-8xc >}}