-
Notifications
You must be signed in to change notification settings - Fork 334
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
Support custom flags for the hugo command via hugo_build() #382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you okay with the alternative implementation I proposed? If you are, please remove the minify
argument as well as the roxygen documentation. Thank you!
R/hugo.R
Outdated
hugo_cmd(c( | ||
if (local) c('-b', site_base_dir(), '-D', '-F'), | ||
if (isTRUE(do_minify)) c('--minify'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just do this:
if (isTRUE(do_minify)) c('--minify'), | |
getOption('blogdown.hugo.args'), |
since it is more general-purpose and allows you to set arbitrary hugo options, not limited to --minify
.
This new option should be documented at https://bookdown.org/yihui/blogdown/more-global-options.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done in jozefhajnala@db3c0da
Please also remember to add an item to |
Done (in a separate commit), please feel free to comment on conventions/wording, happy to align. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect. Thanks!
Since Hugo v0.47 there is minification support for the final rendered output. This PR proposes an option to use
--minify
when building sites with blogdown.