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

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

Closed
enricodata opened this issue Feb 15, 2019 · 6 comments

Comments

@enricodata
Copy link

commented Feb 15, 2019

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

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2019

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

This comment has been minimized.

Copy link
Author

commented Feb 15, 2019

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

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2019

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

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2019

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

This comment has been minimized.

Copy link
Member

commented Feb 15, 2019

@enricodata In fact, blogdown will warn you if your baseURL is https://example.org/:

blogdown/R/utils.R

Lines 169 to 192 in 5e07e32

check_config = function(config, f) {
base = config[['baseurl']]
if (is_example_url(base)) {
open_file(f)
warning(
'You should change the "baseurl" option in ', f, ' from ', base,
' to your actual domain; if you do not have a domain, set "baseurl" to "/"',
immediate. = TRUE, call. = FALSE
)
}
if (is.null(config[['ignoreFiles']])) warning(
'You are recommended to ignore certain files in ', f, ': set the option ignoreFiles',
if (grepl('[.]toml$', f)) ' = ' else ': ',
'["\\\\.Rmd$", "\\\\.Rmarkdown$", "_files$", "_cache$"]',
immediate. = TRUE, call. = FALSE
)
config
}
is_example_url = function(url) {
is.character(url) && grepl(
'^https?://(www[.])?(example.(org|com)|replace-this-with-your-hugo-site.com)/?', url
)
}

It seems you ignored the warning.

@enricodata

This comment has been minimized.

Copy link
Author

commented Feb 15, 2019

thanks. I solved it

@enricodata enricodata closed this Feb 15, 2019

@yihui yihui added this to the v0.11 milestone Feb 15, 2019

@yihui yihui added the question label Feb 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.