Instructions for Windows install?

Theres knowledge needed for everything technical.

Pygments is “server side”, but in this case it means “build time”.

I have used WordPress for many years and wouldn’t call it simpler if you consider all the stuff/plugins needed for caching, SEO, security, Facebook etc. integration, … and writing WP-shortocdes in PHP isn’t hard, but I find the Hugo way way more intuitive.

I guess it is a mindset thing.

AND Hugo should get better at theming (more and better themes, and an easier way to handle them).

Hi Bjorn,

I am on the same boat as Joe in terms of the problem, however my issue is I don’t understand how to get the hugo.exe file on a PATH. I can appreciate this is a totally dumb question, I’ve tried the Hugo course on Udemy but this is also not really clear. Would it be possible to get a clear step by step idea from an expert on how to get hugo.exe into the PATH for myself and future newbies?

Any help would be greatly appreciated.

Thanks Wayne

There is instructions on the net for this:

So if you have hugo.exe in c:/tools/hugo.exe – you would add or prepend “c:/tools” to the PATH string in the instructions above.

Or you could just copy hugo.exe into “c:/windows/system32” or any other folder already on the path.

Writing this from Linux, this is from memory, but I guess you can type

“set %PATH” or maybe it was “set PATH” in cmd

to see what the path looks like

1 Like

I just wrote you a long message explaining what I was doing but thought I’d try it once more and it worked! I thank you sir for taking the time to respond, it is greatly appreciated :slight_smile:

1 Like

Winner, in the long run, you might want to install a Windows PATH editor. The default Windows interface for this is ridiculous, as you’ve noticed — a single field to house a PATH string that can easily go longer than 1,000 characters. Two editor tools built for this purpose are:

Rapid Environment Editor: http://www.rapidee.com/

Windows Environment Variables Editor: http://eveditor.com/

You’ll probably want to avoid Windows system directories, like windows\system32 for stuff like Hugo. You don’t want to be messing around in a directory that has critical operating system and application files. It would be safer to create something like c:\hugo or c:\website\hugo (which will of course require you to update the PATH variable.)

Joe

+1 To JoeWeb’s suggestion to use a path editor if you’re going to be dealing with Windows paths regularly. If this is a one-off type of thing, I recommend putting Hugo.exe somewhere in the existing path, like C:\Windows\System32.

This will show what’s currently in your path: echo %PATH% and if you want to see if hugo is in your path, use where hugo.

Thanks for the feedback on it not being clear. I will add some more instructions to make it clearer.

Hi Joe,

Just saw your response and wanted to say thanks (so thanks :-))

Wayne

The new video on the path looks great, definitely helpful and your advice and patience has been stellar, thanks.

1 Like

I just downloaded the Windows binary and tried to install.
The thing crashed saying before dying:
ERROR: … Config not found (bla bla bla)
ERROR: … Unable to find Static Directory (bla bla bla)
CRITICAL: … No source directory found (bla bla bla)
I thought that binaries were to exempt us Windows users from the trouble to install from source. It looks like I should have installed a lot of things before firing up the binaries… but I cannot find the information about what I should have installed. Anyone can help ?

It’s not really an install. Copy the hugo_0.12_windows_xxxxxx.exe file to a directory on your hard drive that you can use for your site (e.g., D:\HugoSites). Rename it to just hugo.exe. Open a command prompt window, change to that location and then run the command to generate a new site from scratch:

C:\SomePath> cd D:\HugoSites C:\SomePath> d: D:\HugoSites> hugo new site fooby

This creates a new hugo site in D:\HugoSites\fooby for you to work with.

More information on what to do next at http://gohugo.io/overview/quickstart/.

It works! Thanks.
Now the (long?) learning curve ahead…
Thanks again
CDen

You’re welcome. Couple of hints: Start with one of the themes from https://github.com/spf13/hugoThemes or the https://github.com/spf13/HugoBasicExample. Work from there. If you’re just building a site, that should give you a great start. If you’re working on your own layout or theme, bookmark http://gohugo.io/templates/overview/ and ask questions here when you get stuck. Hugo is worth the time spent, plus your questions can help the next person who comes along.

I’m have major issues with running Hugo
I downloaded the win 64 version renamed the exec to hugo.exe.
I also downloaded the source and found a tutorial in there and created the base file structure from it and placed the exec in hugo\bin. Ran hugo help and get; bash: hugo: command not found.
I created a path in the system variables and get the same error. I put hugo.exe in windows system32 folder an still get the same response. Have read all the available docs and tried all suggestions in this forum to no avail.
I have the hugo folder in my F:\ dev server www\hugo. I moved hugo to my C: drive and that did not work either. I rebooted and that did not help. What am I missing here?

You need to put it in your path.

Open command

run

echo %PATH%

make sure Hugo is in one of the directories listed after running that command

Thanks for the quick reply. Paths in Window can be a daunting experience.
Sometimes the simple things slip by when your in deep like not closing the cmd after making changes. Closed the cmd opened it again and good to go. If ya makin mistake ya ain’t doin nuthin.

I really appreciate your time and help.

Hello community, kinda new to Hugo.

Does PowerShell support Hugo? I read a post (from this site, posted in 2014) that PowerShell didn’t recognized Hugo commands. I don’t have problem with Command Prompt since I can run and create new sites with it, however with PowerShell I always get the error “The term ‘hugo’ is not recognized as the name of a cmdlet, function, script file, or operable program.”

Another question, maybe it’s been mentioned on documentation however I didn’t understood it well.

I have downloaded the latest Hugo update (Windows 10, 64-bit), renamed the file to Hugo.exe and put it in my C:\Hugo folder. All my projects are created in that folder, however when I create a new project, I always have to copy that hugo.exe into the project’s folder. If I won’t copy it, then Hugo commands like help aren’t working. Can’t I somehow run it with commands from C:\Hugo instead of copying the .exe into C:\Hugo\myproject and running it from there?

Geo,
It sounds like you need to add C:\Hugo to your PATH. See this thread on superuser.com for help on doing that. If all of that sounds foreign to you, see Wikipedia. If you have any other questions, let us know.

@geo,

you’re not the first one that encoutered that obstacle at the beninning. Here you can find a description why you need to use the PATH environment variable.

Once you understand the concept behind it (unless you have not so far) it should be easy to fix with the links @moorereason provided.

However, could you give us feedback which part of the installation instructions for Windows in the documentation should be more precisely? This could help us to improve the docs.

Oh right, @moorereason & @digitalcraftsman. Basically I did a stupid mistake, when I downloaded Hugo, I had added to my PATH the Desktop path because that’s where I had the file but later I copied my file to C:\ but forgot to change the PATH. Thanks for the fast response. Everything is working now.