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).
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?
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:
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.)
+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.
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.
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?
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.
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?
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.
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.