Skip to content
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

Request. Is it possible to allow a rebuild using the hugo command ? #23

Closed
tovare opened this issue Dec 26, 2016 · 2 comments
Closed

Request. Is it possible to allow a rebuild using the hugo command ? #23

tovare opened this issue Dec 26, 2016 · 2 comments
Milestone

Comments

@tovare
Copy link

tovare commented Dec 26, 2016

Hi,

My images break when running hugo from the commandline, because the html-file in the contents directory is used without alterations:

<img src="#####../content/post/R_files/figure-html/pressure-1.png" width="672" />
Using blogdown::build command the image is correct:

<p><img src="figures/pressure-1.png" width="672" /></p>

It would be practical if the hugo command could be used when non-R pages are written or updated.

@yihui yihui modified the milestone: v0.1 Dec 30, 2016
@yihui
Copy link
Member

yihui commented Dec 31, 2016

If your website contains Rmd files, you must use blogdown::build_site() to build the site. You can see from its documentation that build_site() = run the hugo command + post-process HTML files to resolve image paths that were rendered from Rmd.

Even if your website does not contain Rmd files, it is not harmful to use build_site(). So I wonder why you prefer running the hugo command by yourself.

In practice, blogdown::serve_site() is pretty much all you need to do (perhaps after setting options(servr.daemon = TRUE)).

@yihui yihui closed this as completed Jan 5, 2017
@yihui
Copy link
Member

yihui commented Jun 23, 2017

Note the default behavior has been changed. The website can be built directly by Hugo after serve_site().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants