rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.73k stars 335 forks source link

hugo-tranquilpeak-theme does not render in rstudio nor on Netlify #369

Closed enricodata closed 5 years ago

enricodata commented 5 years ago

When using hugo-tranquilpeak-theme it does not render in rstudio nor on Netlify. This is how it looks like: image

The same happens for other hugo themes like hugo-future-imperfect. What should be done to fix it?

gadenbuie commented 5 years ago

It's very hard to diagnose your issue from a screenshot. It would be helpful if you could upload your code to a repository or gist and share the link.

enricodata commented 5 years ago

The code is available here: https://gitlab.com/enricodata/ir and here there is the page where it is deployed: https://themetest.netlify.com/

gadenbuie commented 5 years ago

First thought is that you need to adjust the base url in config.toml.

baseURL = "https://example.org/"

See A quick example in the Getting Started chapter of the blogdown book for a good introduction. The section on Configuration is another good, in-depth resource.

gadenbuie commented 5 years ago

Actually, to be more specific, the book addresses this in Configuration - Options:

  • baseURL: Normally you have to change the value of this option to the base URL of your website. Some Hugo themes may have it set to http://replace-this-with-your-hugo-site.com/ or http://www.example.com/ in their example sites, but please make sure to replace them with your own URL (see Chapter 3 and Appendix C for more information on publishing websites and obtaining domain names). Note that this option can be a URL with a subpath, if your website is to be published under a subpath of a domain name, e.g., http://www.example.com/docs/.
yihui commented 5 years ago

@enricodata In fact, blogdown will warn you if your baseURL is https://example.org/: https://github.com/rstudio/blogdown/blob/5e07e32e5ecd153b1cbded7965b30f855499f2e7/R/utils.R#L169-L192

It seems you ignored the warning.

enricodata commented 5 years ago

thanks. I solved it