gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.96k stars 7.54k forks source link

Add HUGOFLAGS env var #5947

Open bep opened 5 years ago

bep commented 5 years ago

Saw this in the Go CLI, which I would find useful having something similar for Hugo:

GOFLAGS=-mod=vendor

E.g.

HUGOFLAGS="-D --path-warnings"

Or something.

Boot-Error commented 5 years ago

Hello OP, This sounds super useful! I'm willing to take up this issue. Please hint me some pointers in the codebase to starts hacking :smiley:

Here https://github.com/gohugoio/hugo/blob/0e75af74db30259ec355a7b79a1e257d5fe00eef/main.go#L23 the value of HUGOFLAGS can be added along with os.Args[1:].

redstreet commented 1 month ago

Wondering if this will be added, or if there is something blocking it? Thanks.

bep commented 1 month ago

@redstreet this is a 5 year old issue; I have relabeled it to a Proposal, which indicates that this needs a lot more thinking before we consider implementing this.