How to install Hugo?

I downloaded and unpacked the hugo_0.11_linux_amd64.tar.gz file from releases , and I cannot figure out how to run the binary. I took a few beats when using go run and sh , but no luck. Can anyone suggest some more details?

+6
source share
3 answers

Extract hugo_0.11_linux_amd64.tar.gz into the directory. In this directory you will find three files:

 hugo_0.11_linux_amd64 LICENSE.md README.md 

Make sure that either hugo is in your path, or indicate the path to it. For example, rename the executable file hugo_0.11_linux_amd64 to hugo . Move the hugo executable to /usr/local/bin .

Run

 $ hugo help 

Continue to follow the instructions for Using Hugo .

Literature:

Hugo

Hugo Documentation: Getting Started

+10
source

The installation page indicates:

Once downloaded, it can be launched from anywhere. You do not need to install it in a global location.
Ideally, you should install it somewhere in your path for ease of use. /usr/local/bin is the most likely location.

Until:

  • You have chosen the correct release for your architecture (Linux, Mac, or Windows).
  • rename the executable file to hugo (or make a symbolic link to it called hugo)
  • the $PATH environment variable (or %PATH% on Windows) refers to the hugo executable, you can start using it.

     hugo new site /path/to/site 
+4
source

An old question, but I thought it might help someone along the way. I am on Windows (yes, I know what it was for Linux ) and running Hugo outside the created directory where hugo.exe lives.

Note that hugo.exe does not need to reside in c:\hugo\bin according to the example below

  • Download Hugo (64 or 32-bit) from https://github.com/spf13/hugo/releases
  • Create a folder in C:\ called Hugo .
  • Create another folder inside C:\Hugo called bin
  • Unzip the file downloaded from the HUGO URL into the bin folder
  • Open cmd.exe to add the HUGO path to the Windows PATH environment variables. Type set PATH=%PATH%;C:\Hugo\bin

To make sure hugo is installed globally, enter where hugo in any directory on the command line and it will tell you where it is (in our case, c:\hugo\bin\hugo.exe )

From there, you can launch your Hugo sites from any repository on your HD.

+3
source

Source: https://habr.com/ru/post/974619/


All Articles