Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Running Hugo #5

Open
yudyananda opened this issue Dec 13, 2017 · 7 comments
Open

Error Running Hugo #5

yudyananda opened this issue Dec 13, 2017 · 7 comments

Comments

@yudyananda
Copy link

yudyananda commented Dec 13, 2017

Hi there

Im using stable version of Cockpit and done all the Hugo cockpit instruction, but cannot run hugo.

The notification say "Eror running hugo"
hugocockpit

@zontarian
Copy link
Collaborator

hi,
I've never tested it on Windows, so maybe that's a problem.
Besides this, could you please see in your php error log file (if you have one) and see what gets logged there?

And.. hugo binary is configured correctly? i.e. the Settings file has an entry for the hugo binary, maybe you have to hardcode it. On unix usually hugo is in the path so the default value works.

Please see the doc and set hugo_script according to your environment.

@yudyananda
Copy link
Author

Hi thanks for the response

I managed to run Hugo without cockpit, so i assume that the binary is configured correctly

[Thu Dec 14 11:21:17.837414 2017] [php7:notice] [pid 13084:tid 1892] [client 127.0.0.1:10408] Creating hugo file C:\\xampp\\htdocs\\cockpit-master\\addons\\Hugo/config.yaml, referer: http://localhost/cockpit-master/
[Thu Dec 14 11:21:19.236443 2017] [php7:notice] [pid 13084:tid 1920] [client 127.0.0.1:10414] Config file is Array\n(\n    [hugo_script] => hugo\n    [hugo_conf_prefix] => config\n    [hugo_conf_extension] => toml\n    [cockpit_storage_prefix] => /storage/hugo\n    [hugo_extra_params] => --cleanDestinationDir --canonifyURLs\n    [hugo_base_dir] => E:/HUBLOG/original\n    [hugo_theme] => 311\n)\n, referer: http://localhost/cockpit-master/hugo
[Thu Dec 14 11:21:23.300907 2017] [php7:notice] [pid 13084:tid 1900] [client 127.0.0.1:10415] RUNNING HUGO! theme 311 and env prod, referer: http://localhost/cockpit-master/hugo
[Thu Dec 14 11:21:23.301907 2017] [php7:notice] [pid 13084:tid 1900] [client 127.0.0.1:10415] Config file is Array\n(\n    [hugo_script] => hugo\n    [hugo_conf_prefix] => config\n    [hugo_conf_extension] => toml\n    [cockpit_storage_prefix] => /storage/hugo\n    [hugo_extra_params] => --cleanDestinationDir --canonifyURLs\n    [hugo_base_dir] => E:/HUBLOG/original\n    [hugo_theme] => 311\n)\n, referer: http://localhost/cockpit-master/hugo
[Thu Dec 14 11:21:23.301907 2017] [php7:notice] [pid 13084:tid 1900] [client 127.0.0.1:10415] BASE DIR E:/HUBLOG/original, referer: http://localhost/cockpit-master/hugo
[Thu Dec 14 11:21:23.301907 2017] [php7:notice] [pid 13084:tid 1900] [client 127.0.0.1:10415] LANGUAGES Array\n(\n    [0] => default\n)\n, referer: http://localhost/cockpit-master/hugo
[Thu Dec 14 11:21:23.305902 2017] [php7:notice] [pid 13084:tid 1900] [client 127.0.0.1:10415] Running cd E:/HUBLOG/original ;hugo -t 311 --cleanDestinationDir --canonifyURLs --config="E:/HUBLOG/original/config.toml", referer: http://localhost/cockpit-master/hugo
The filename, directory name, or volume label syntax is incorrect.
[Thu Dec 14 11:21:23.339907 2017] [php7:notice] [pid 13084:tid 1900] [client 127.0.0.1:10415] CMD OUT .1., referer: http://localhost/cockpit-master/hugo
[Thu Dec 14 11:21:23.339907 2017] [php7:notice] [pid 13084:tid 1900] [client 127.0.0.1:10415] ERROR .., referer: http://localhost/cockpit-master/hugo
[Thu Dec 14 11:21:23.339907 2017] [php7:notice] [pid 13084:tid 1900] [client 127.0.0.1:10415] Returning error 1,  -- Array\n(\n)\n, referer: http://localhost/cockpit-master/hugo

the hugo folder set in a different directory and folder
the cockpit in C;\xampp and hugo in E:\

The generate button is working, but not with RUn Hugo

@zontarian
Copy link
Collaborator

zontarian commented Dec 14, 2017 via email

@yudyananda
Copy link
Author

yudyananda commented Dec 14, 2017

Sorry, do you mean this >> addons\Hugo/config.yaml, it is empty

if you dont mind, can you give me example how to add the configuration on yaml file?

key default use
hugo_script hugo path to the hugo binary
hugo_conf_prefix config base name of hugo config file
hugo_conf_extension toml extension of hugo config file
hugo_base_dir   full path of base Hugo installation dir, where content, config and public dir resides
hugo_theme   theme used to generate Hugo site
cockpit_storage_prefix /storage/hugo prefix of Hugo specific subdir of the root finder
hugo_extra_params --cleanDestinationDir any parameter you want to be passed to hugo while generating a site

Regards

@zontarian
Copy link
Collaborator

This is my sample config.yaml file in the Hugo addon directory:

# Cockpit-hugo config settings

has_staging: true
hugo_script: hugo
hugo_conf_prefix: config
hugo_conf_extension: toml
cockpit_storage_prefix: /storage/hugo
hugo_extra_params: --cleanDestinationDir --canonifyURLs
hugo_base_dir: /Users/me/web/sites/iakta.org/hugo/
hugo_theme: iakta-org-bleak

@frankjonen
Copy link

Going through my Apache logs, the issue that I had was --canonifyURLs. That doesn't exist in Hugo anymore. It apparently got moved into the Hugo project config file. If you did all the above and it still didn't go through. Remove that and it'll most likely work.

@jasonday
Copy link

Same issue here, but removing canonifyURLS did not fix it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants