docker-hugo icon indicating copy to clipboard operation
docker-hugo copied to clipboard

Add additional hugo options?

Open mattstratton opened this issue 6 years ago • 4 comments

It would be quite helpful to be able to pass additional arguments to the hugo command - for example, in my tests, I have various config files that I want to test my theme against, and I pass the config file as an argument (i.e., --config config-blue-grid.toml)

I can probably add a PR to add this functionality, but wondering the thoughts on this? What might be easier is instead of trying to think of all the options, have an environment variable for "additional arguments" that is a string where you can list them.

mattstratton avatar Mar 09 '18 16:03 mattstratton

aha. It would appear you have this here?

https://github.com/jojomi/docker-hugo/blob/master/run.sh#L10

mattstratton avatar Mar 09 '18 16:03 mattstratton

Yes, that should already work because of the line you spotted. Would you mind testing it and reporting if it works? If it does, you could close this issue :).

jojomi avatar Mar 09 '18 19:03 jojomi

I’ll give it a try. The issue I’m running into is is that for theme testing I need to run inside exampleSite where theme directory is the level above; and that doesn’t seem Tom work with this container :/

mattstratton avatar Mar 09 '18 19:03 mattstratton

I think that my docker-fu is failing me. I'm not sure where to pass the arguments - any ideas?

mattstratton avatar Mar 09 '18 20:03 mattstratton