Download link in Rmarkdown website

Is it possible to add a a link to download a file directly from a url? I'm doing a basic website with rmarkdown and I tried to use downloadthis but it doesn't seem to work.
This is the chunk

## Link in Github repo
  link = "",
  button_label = "Download file",
  button_type = "danger",
  has_icon = TRUE,
  icon = "fa fa-save",
  self_contained = FALSE

I think it is possible but you need to use a download url. In the example, it is github raw content and the url will open the raw file in the browser when it is text, not trigger a download. So clicking on the button will open the raw file in the browser.

Thanks, I figured it out. Not the best way though. I used a tool called DownGit. Not sure how to do a download url on github.

1 Like