Filebrowser: hugo plugin does not recognize options with the latest caddy

Created on 2 Oct 2016  路  5Comments  路  Source: filebrowser/filebrowser

I'm running FreeBSD 10.2 with Caddy 0.9.3

root@freebsd:/usr/local/www # caddy -version
Caddy 0.9.3

Hugo version:

root@freebsd:/usr/local/www # hugo version
Hugo Static Site Generator v0.16 BuildDate: 2016-08-24T09:19:51Z

test config:

domain.me {
    root /usr/local/www/domain/public
    hugo /usr/local/www/domain {
        buildDrafts
        watch
        theme paperback
    }
    tls [email protected]
    gzip
}

Run and result:

root@freebsd:/usr/local/www # caddy -conf testconfig
Activating privacy features... done.
Unknown option buildDrafts
Unknown option watch
Unknown option theme
Unknown option paperback
https://domain.me
http://domain.me
Started building site
=============================================================
Your rendered home page is blank: /index.html is zero-length
 * Did you specify a theme on the command-line or in your
   "config.toml" file?  (Current theme: "")
 * For more debugging information, run "hugo -v"
=============================================================
0 of 1 draft rendered
0 future content
0 pages created
0 non-page files copied
0 paginator pages created
0 tags created
0 categories created
in 15 ms

These configurations used to work and the only change that was made was that the old caddy binary was replaced with the new one.

All 5 comments

Hello @eternaltyro!

There is a little different new syntax. Check it out. I changed it because it now can wrap the File Manager options. Read it! I think you'll like it :smiley: Any other doubt, tell me!

Is flag a literal? Is the following a valid config?

domain.tld {
  root /usr/local/www/domain/public
  hugo /usr/local/www/domain {
    flag buildDrafts
    flag watch
    flag theme paperback
  }
  ...
}

This doesn't work. I don't see caddy running hugo at all. Usually, in the older version, I could see hugo running under watch mode when I do ps aux. What am I doing wrong?

It works "only" if I add the flags to config.toml under /usr/local/www/domain AND uncomment the hugo block for caddy. The working Caddyfile snippet is:

domain.tld {
  root /usr/local/www/domain/public
  hugo /usr/local/www/domain 
  ...
}

Hey @eternaltyro, everything is working here with the newest version (0.17). And what you sent is valid, yes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GuyPaddock picture GuyPaddock  路  3Comments

SJ50 picture SJ50  路  5Comments

ferronrsmith picture ferronrsmith  路  7Comments

aoceano picture aoceano  路  4Comments

kylefrost picture kylefrost  路  4Comments