Embedding HTML containing links to online pages in Shiny App

Hi, I am trying to embed an HTML link in my shiny app. As indicated in the previous post, I saved the HTML file on my local drive and used includeHTML function to do this. However, all of the links in the HTML is considered as relative paths, which caused the content not to load properly. Is there any workaround to this?

Thanks!

Im not sure what you mean by embed a link. Shiny has tags for a() - as in the html anchors. Wouldnt you use that?

Thanks for your response! So basically, I wanted to include a web page as one of the pages on my shiny apps. I have downloaded the page as an HTML file. However, it doesn't load correctly because the HTML file contains paths that are supposed to be interpreted as relative paths to the baseURL, instead of my shiny app local "URL" (e.g. "http://127.0.0.1:7701/").

Here is an example

to download as a zip:
https://github.com/nirguk/example_shiny_includeHTML/archive/main.zip

1 Like

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.