Sharing buttons in academic theme not working on blog post - r

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.
Leading to this not very actionable Tweet:
Instead what I want is this:
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.

I had the same problem. Instead of adding it to each post. I found a related issue where Yihui Xie recommends setting the baseURL on the config.toml file and then build the site:
serve_site() is only for local preview. If you want to publish the site, you need to run blogdown::build_site() so that baseurl is actually written to all pages.

After a number of different approaches to this problem, I resolved it by adding the baseurl: to each page's header (see image below).
The page now renders full links using the sharing buttons.

Related

Is there a way to create 'docs' style internal project post in hugo academic?

Following on from this question and answer, I was wondering if it is possible to create an internal project post in Blogdown and hugo academic that is structured like a "Courses" document?
My current thought is to create a 'hidden' courses section that can be linked to by a project, however, relative paths like external_link: "courses/my-example-course" don't seem to work. I suppose I could provide an https link after publishing, but this seems inefficient.
Does anyone have any suggestions?
Thanks,
So it turns out that it just wasn't working in the RStudio viewer, which I use instead of Chrome because it is unusably slow on my laptop. It's opening another tab, but that's to be expected with an external link.
The working solution is to use external_link: /courses/my-example-course, and it's important to have the first /, otherwise it returns a 404 page.

Using a Wordpress plugin feature elsewhere within theme files

I'm using the ultimate member online plugin, which shows members' online status.
When enabled to show on a user's UM profile page, it looks like this, for example:
When creating posts, it is common for data pertaining to the author to display somewhere within the post. For example:
What I'd like to accomplish is to have online status (shown in first image, above) also be displayed within this author data, shown within a post.
I've poked around in theme/plugin files, and I'm CLOSE!
I found where I need to edit, within the theme files (wp-content/themes/plum/inc/template-tags.php file)
I've narrowed the plugin files and content within them down, to what i believe would be the appropriate code to insert into theme files. Screenshots and copied [relevant] text can be found here:
Ive been playing around, reading the web, creating a post on the official wp forums (as well as searching within them), and this is the best I've got so far:
On the surface, it looks like the problem is solved. However, that user ("testAuthor1"), is offline (and the greenlight there in that very last imgur link displays the user as online).

Dnn 2sxc Blog Module sub-directory

I am testing out DNN 8 and am using the blog app and content management from 2sxc (great module, BTW!).
I have the recent blog post listed on a page sub-directory called '/articles'. But I also wanted some of them listed on the home page as well. When I add the app or module to the home page the url is '/home/post/post-title-here' while on the /articles page the urls are '/articles/post/post-title-here'. This creates the illusion that I have two directories with duplicate blog posts (which probably will get me some dings for SEO for duplicating the same content).
How do I get the app to use the common directory '/articles' regardless of where I put the module/app on the site? I've looked at settings all over and don't see anything that pops out at me. Also not sure if this is a DNN setting or a setting specifically to the extension. Finally, I'd like to be able to keep the year/date/month parts of my url as well as they were on the old site. I assume making that change would probably be similar with the solution to my original question. If that's a different fix, then let me know and I'll put it into a new thread. Thanks in advance!
This question is basically about the blog-app. Now if I understand you correctly, your question is "Can I have multiple lists on various pages, but all of them still link to my main details page". The answer is yes, but the exact solution depends a bit on what you need.
So basically there is a setting in the app-settings to define the main page. I believe it's empty by default, so that the blog-app works automatically without you having to configure anything. But AFAIK if you set that, all blog-details-links will use that as the only source.

Wordpress and Cloudflare: how to update (cached?) images

I have my blog (wordpress) web site hosted at bluehost.com. A few months ago I decided to enable Cloudflare (through CPanel).
It's all working well (and I am seeing better overall performance etc) BUT I have a small issue I am dealing with.
I posted this blog some 10 days ago: http://it20.info/2016/01/why-docker-containers-and-docker-oss-docker-inc/
A few days later I had to change picture #2 (of 3) to tweak it a bit. The old picture says "Unikernel" in the red rectangle and the new picture (I uploaded) says "Unikernel/vm".
Note that inside the blog post I make an external reference to the picture (in the html code):
http://www.it20.info/misc/pictures/WhyDocker-ContainersAndDockerOSS-DockerInc2.jpg
If you point STRAIGHT to the picture you will see the new version (so I know I have updated it properly).
However the blog post still shows the old picture (as if Cloudflare is caching it indefinitely).
If in the blog post I right click on the image and do a "view image" (Firefox) it points to: http://i0.wp.com/www.it20.info/misc/pictures/WhyDocker-ContainersAndDockerOSS-DockerInc2.jpg?resize=640%2C392
(which shows the OLD image).
Funny enough if I remove the "?resize=640%2C392" it shows the proper picture.
I am trying to figure out a proper procedure to 1) write a blog post that refers to pictures as external links 2) possibly update said picture via an FTP upload and 3) have Cloudflare render the updated picture.
Thanks.
The root of your problem could be that query string after the image URL:
?resize=640%2C392
In CloudFlare, go to the caching settings and check if your current caching level is standard. If yes try changing to either no query string or ignore query string.
As far as a proper proceedure for future posts where images could change, as an alternative to purging all your site files in CloudFlare, or selectively purging just the image file in question, woudl it be feasible for you to simply change the name of the updated image file, or keep the same name but upload it to a different directory? And of course update the image src in your HTML as well.
Good luck

Site producing bad urls?

I'm using a custom Genesis child theme and lately I've been noticing that many false articles have been showing up on webmaster tools. They look something like this:
I haven't written these nor are they topics my site focuses on so I have no clue why they are showing up. So far, I've had to delete about a hundred of these. I read on a forum that this can be due to my theme generating bad urls but I'm not sure what that means nor do I know how to fix it. What can be causing this?
I believe that this problem is due to your website being hacked or Google is trying to Crawl or follow a link within your content that is not really a link.
This is what webmaster tool tells you about the problem:
In Crawl Errors, you might occasionally see 404 errors for URLs you don't believe exist on your own site or on the web. These unexpected URLs might be generated by Googlebot trying to follow links found in JavaScript, Flash files, or other embedded content.
To find out if your website has been hacked. First get this total = WordPress number of pages + number of post + number of categories + number of PDF or files + Images. Then do a google search using the following query (without the quotes) "site:yourdomain.com" if the result number is exaggerated greater than the calculated total then your website is definitely hacked.
If you believe that your website is not hacked try to find from where these links are being generated. Here is the trick: Go to the Web Master Tool report and click on one of those links, check the "Linked from" tab. There should be one or many possible pages listed from where these unexpected links are coming from.
Two possible Outcomes:
The page from where the link is found is from your own website: Go
to that page and open the source code, do a Ctrl+F search for that
link, if found check what section or content is generating this
problem.
The page from where the link is found is NOT from your own website:
In this case try to contact the owner of the other site and ask the
link to be removed, if not possible I highly recommend you to create
a 404 page within your WordPress installation with some useful
links. Google how to do this, there are plenty of resources.
Hope this helps

Resources