I got a problem while launching hugo server with asciidoc files :
Building sites … ERROR 2018/01/15 16:04:33 asciidoctor / asciidoc not found in $PATH: Please install.
Leaving AsciiDoc content unrendered.
My asciidoc files are placed here : mysite/content Asciidoctor / Asciidoc are installed (i followed : http://asciidoctor.org/docs/install-toolchain/)
My $PATH is good i think :/home/vagrant/bin:/home/vagrant/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/bin:/sbin:/bin/usr/games:/snap/bin
Hugo version : Hugo Static Site Generator v0.32.4 linux/amd64 BuildDate: 2018-01-12T04:16:41Z
$ which hugo
/usr/local/bin/hugo
$ hugo env
Hugo Static Site Generator v0.32.4 linux/amd64 BuildDate: 2018-01-11T09:58:37+01:00
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.9.2"
$ hugo server
Building sites … ERROR 2018/01/16 11:37:49 asciidoctor / asciidoc not found in $PATH: Please install.
Leaving AsciiDoc content unrendered.
...
$ sudo apt-get install asciidoctor # debian based system
$ which asciidoctor
/usr/bin/asciidoctor
$ asciidoctor --version
Asciidoctor 1.5.4 [http://asciidoctor.org]
Runtime Environment (ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)
Even with the apt-get install way, i got the same error.
Futhermore, it seem you have the same error :
$ hugo server
Building sites … **ERROR 2018/01/16 11:37:49 asciidoctor / asciidoc not found in $PATH: Please install.**
Leaving AsciiDoc content unrendered.
...
Ah - well done!
This throws the error. I can reproduce:
$ sudo snap install hugo
=>
$ /snap/bin/hugo server
Building sites … ERROR 2018/01/16 23:18:48 asciidoctor / asciidoc not found in $PATH: Please install.
Leaving AsciiDoc content unrendered.
$ /usr/local/bin/hugo server
# all OK
The /usr/local/bin/hugo executable (from the debian package) works well.
There is a note about the snap installation:
Looks like there are some downsides in using the snap installation:
Hugo-as-a-snap can write only inside the user’s $HOME directory—and gvfs-mounted directories owned by the user
wget https://github.com/gohugoio/hugo/releases/download/v0.32.4/hugo_0.32.4_Linux-64bit.tar.gz -O - | tar -xvz
or
curl https://github.com/gohugoio/hugo/releases/download/v0.32.4/hugo_0.32.4_Linux-64bit.tar.gz -L | tar -xvz
No root access needed for the last 2 ones where you end up with having the hugo executable in the current directory (README.md and LICENSE.md as well).
use then
./hugo
to make sure you run the wanted executable
So if you want to use asciidoctor - do not use the snap installation for this project.
(Maybe someone with snap knowledge can jump in and advice …)
I know for sure that you cannot launch an editor with hugo new from the terminal when using the snap.
I haven’t tested what you ask me.
But as you said above, such limitations can be overcome by removing the snap and installing Hugo from a tar or deb. Of course then you will have to update manually with every release.