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

Correcting fig.path errors #548

Closed
thedivtagguy opened this issue Dec 25, 2020 · 3 comments
Closed

Correcting fig.path errors #548

thedivtagguy opened this issue Dec 25, 2020 · 3 comments
Labels
question

Comments

@thedivtagguy
Copy link

@thedivtagguy thedivtagguy commented Dec 25, 2020

It would be helpful to include some guides on how to tackle fig.path errors.

I'm currently facing an issue where my .Rmarkdown pages are being rendered fine, except I do not see any output being displayed at all. No plots, no tables, nothing. I think somehow, my fig.path has been messed up.

The output for the line knitr::opts_chunk$get('fig.path') is ## [1] "index_files/figure-html/"
How do I fix the problem and reset the fig.path to default? Currently, I see no output being displayed at all, only code chunks.

My repo is hosted here: https://github.com/thedivtagguy/website if this helps.
Live website deploy: https://thedivtagguy.netlify.app/

@yihui yihui added question and removed documentation labels Dec 30, 2020
@yihui
Copy link
Member

@yihui yihui commented Dec 30, 2020

I think I know what's wrong, but I'd rather have you install the development version (restart R after installation):

remotes::install_github('rstudio/blogdown')

and run blogdown::check_site(). It should tell you all potential problems of your site.

BTW, it's not relevant to fig.path.

@thedivtagguy
Copy link
Author

@thedivtagguy thedivtagguy commented Dec 30, 2020

You were right! This is what I got:

| Checking setting for Hugo's Markdown renderer...
| You are using the Markdown renderer 'goldmark'.
● [TODO] Allow goldmark to render raw HTML by adding this setting toconfig.yaml(see https://github.com/rstudio/blogdown/issues/447 for more info):

markup:
  goldmark:
    renderer:
      unsafe: true
Do you want blogdown to set this for you? (y/n) y

Thank you so much, I've been struggling with this for days now. I also read this page here that check_site() gave me and it makes so much more sense now. I should have installed the development version first!

@yihui yihui closed this as completed in 33e793a Dec 30, 2020
@yihui
Copy link
Member

@yihui yihui commented Dec 30, 2020

Great to know! You are certainly not the only one who has struggled with this unsafe option for long. If only the Hugo developer could be bribed, I'd be happy to mail him a check to change this forever confusing default :)

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

No branches or pull requests

2 participants