Search code examples
rhugoblogdown

Sharing buttons in academic theme not working on blog post


I am sure this issue has a relatively straightforward solution, but I am a general web development novice, new to blogdown specifically, and just created my first site.

Aside from this one issue, everything is working great. In fact, I generally love the functionality, but I am having trouble getting the sharing buttons on my blog post to function properly. The issue is that a reader can share the title of a blog, on say Twitter, but it does not generate a URL for the post.

The result is that you get a Tweet with nothing linked... which is not helpful.

enter image description here

Leading to this not very actionable Tweet:

enter image description here

Instead what I want is this:

enter image description here

Here is the specific page where it is a problem:

https://mgb-research.netlify.com/post/gaussian-process-imputation-models/

And here is my Git repo with the site files:

https://github.com/matgbar/main_site

I can see that the button is referencing post/gaussian-process-imputation-models/, but it is not including the equally important: https://mgb-research.netlify.com/ in front of the page info.

I have tried tinkering with certain settings, including relativeruls=false vs. true. Nothing seems to make a difference that I have done so far.


Solution

  • After a number of different approaches to this problem, I resolved it by adding the baseurl: to each page's header (see image below).

    enter image description here

    The page now renders full links using the sharing buttons.