Closed Brinkhuis closed 6 years ago
@Brinkhuis do you configure your baseURL
config.toml
? (https://gohugo.io/getting-started/configuration/)
Yes, I did config baseURL
in config.toml
with value https://brinkhuis.github.io/
.
Ok thank for confirmation.
The only diff I can see from https://tranquilpeak.kakawait.com is about this.page.url
where in your case is not an URL but only a path
I have to find why, in addition that I'm using .Permalink
variable that should be standard/built-in https://github.com/kakawait/hugo-tranquilpeak-theme/blob/master/layouts/partials/script.html#L38
@Brinkhuis Could you please gimme the hugo
cli command are you using to generate? And do you have any errors or warning during generation?
I generate from RStudio, using the command blogdown::serve_site()
I'm not a RStudio or Blogdown expert but from what I can see https://github.com/rstudio/blogdown/issues/93#issuecomment-297244046
You should use build_site()
instead, as linked comment suggest
I tried generating with 'build_site()' but that give the same result.
Is there a setting in config.toml
to 'correct' my this.page.url
value?
My page now seems right now...
<script>
var disqus_config = function () {
this.page.url = 'https:\/\/brinkhuis.github.io\/2017\/11\/web-scraping-and-visualizing-data-from-coolblue\/';
this.page.identifier = '\/2017\/11\/web-scraping-and-visualizing-data-from-coolblue\/'
};
(function() {
if (window.location.hostname == "localhost") {
return;
}
var d = document, s = d.createElement('script');
var disqus_shortname = 'https-brinkhuis-github-io';
s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
@Brinkhuis Now with that code Disqus works for me on https://brinkhuis.github.io/2017/11/web-scraping-and-visualizing-data-from-coolblue/
I see, great! I will add a new post and see if it will also work there...
About your question, I was answered before you update thread.
Is there a setting in config.toml to 'correct' my this.page.url value?
For Disqus only baseURL
and disqusShortname
are mandatory and you filled both correctly
With the setting relativeurls = true
in config.toml
and using the command blogdown::build_site(local=FALSE)
from RStudio
everything seems allright!
Thanks for your time and help!
@Brinkhuis Ok if it's ok for you I will close that issue, feel free to re-open if relevant
Thank you for using Tranquilpeak and have fun
Configuration
Actual behavior
I created a new post on my site brinkhuis.github.io from RStudio with blogdown::new_post("Web Scraping and Visualizing Data from Coolblue") but cannot get Disqus working. It keeps giving the message "We were unable to load Disqus. If you are a moderator please see our troubleshooting guide."
I put my disqusShortname ("https-brinkhuis-github-io") in the config.toml and added
brinkhuis.github.io
anddisqus.com
as trusted sites.Am I missing something here?
Expected behavior
Disqus to be displayed (on page https://brinkhuis.github.io/2017/11/web-scraping-and-visualizing-data-from-coolblue)
Steps to reproduce the behavior