Home
Support Forums

Links do not work on netlify, but do on local host; using R+blogdown+github+netlify

Hi! I am having problems with linking to my pages. Specifically, I build my page in R using blogdown, and I push this to Github. My github page is at https://github.com/toddrjones/website. The page works well on my local host from R.

But when I look at it on Netflify at https://toddrjones.netlify.app/, the Research, Data Visualization, and Personal links all do not work. I have tried making them in .Rmarkdown/.markdown and currently in .Rmd/.html, but nothing works. I have also tried different ways to refer to the files in config.yaml. And even put the personal in its own folder with a file named _index, but nothing works on netlfiy, even though it works on my local host. What should I do? I am new to all of this and don’t perfectly understand how some of the intricacies work (.markdown vs. html, relative links, the content vs. static folders, etc.), so any help would be greatly appreciated!

Note that I would prefer to not create page bundles, but will do so if necessary.

UPDATE: when I download the deploy, the expected files (research, etc.) are not there.

Hi, @toddrjones. I see the files in the deploy made about four hours after this post and the links are working now.

In other words, it looks like you fixed this already on your own. Please feel free to share your solution here (if you have time) as I’m sure someone else searching for answers in the future to similar questions would appreciate to know how you solved this.

Again, we are busy so if you don’t have time, we understand. Last but not least, if it isn’t resolved or if there are other questions, do follow-up to let us know and we’ll be here to assist.

Yes, @luke, I was able to get it working. The solution was simply to use the “Addins” button in RStudio and to create the post with the “New Post” button instead of creating it some other way. I am not sure why it worked, though it may have to do with draft, but not sure.

I was able to troubleshoot by downloading the deployed site from netlify and looking at the file and folder structure. I noticed that the pages I was trying to link to were not present. So they were not getting compiled for some reason. Anyway, recreating the pages using the aforementioned method solved the problem and things work now.

2 Likes

Thanks for confirming and letting us know what worked for you! This information will definitely be beneficial to future members who encounter something similar. :netliconfetti: