I'm having trouble seeing interactive graphs using the distill package and posting them to Netlify. I've saved the plotly graph as an html.file using htmlwidgets and when I knit the page, the interactive graph appears as well as when I build the website. However, when I import from GitHub or try to upload the _site folder manually to Netlify, the website will render with the text and all, but the plots appear as just blanc squares. Below is how the index.Rmd file is built up.
I'm unsure if it is the wrong function I'm using since the plots appears when I knit the page, but disappears when I deploy it to Netlify. Is there some particular restrictions on posting interactive graphs via Netlify or GitHub andthe like?
Any help would be much appreciated.
---
title: "About me"
description: |
site: distill::distill_website
self_contained: false
---
Short introduction here to graph below:
knitr::include_url("C:/Users/PC/Desktop/R Working directory/data_website/emigrationstocks2000_v2.html")
Related
I have my blogdown site that has been running for a while. When writing a post today I cannot get plots to render when running serve_site().
The plot generates fine when running the .Rmd in interactive mode, it's only when being built by knitting/serve_site/build_site that it doesn't work. The image below shows what I see on the webpage - just that small icon in the bottom.
I know these questions have come up a lot, so just to list the things I've tried:
There is no .gitignore under the static directory
I've set [markup.goldmark.renderer]unsafe = true in the config.toml
I've checked that the figures are being generated (I can see the files under index_files/figure-html)
You can see my blog source here
And the (not working) webpage here
When I use the blogdown and hugo academic create a website, one example post created by rmd file (2015-07-23-r-rmarkdown) has chunk code, but the plot of this chunk code did not show in the post see here. I can see the chunk code created figures in the figure_html folder though
besides, when insert image from addin in rstudio, it automatically provides a path: static/blog/2020-11-09-creating-a-website/index_files/1.JPG, however the image does not show in the post. When I use a path static/blog/2020-11-09-creating-a-website/1.JPG, it works. What could be wrong with the index_files folder?
I have an R flexdashboard that runs with shiny and although I have managed to host it on shinyapp.io, I cannot get images to render. I understand that normally, with a Shiny app, I would need to place the images in a 'www' folder. But with a flexdashboard there is no associated folder like that. How would I go about getting the images to load on shinyapp.io? Images show up completely fine when I run the flexdashboard locally.
It's ok to put your images in a www folder. Make sure to reference the path. Example markdown text:
Built with ![](www/shiny_50.png).
I was having problems rendering that image until I discovered that its original resolution was too large to fit in the chart window. I used the Magick package to resize.
Rebuilding blogdown site is not rendering correctly for some themes.
Having created a new directory using the R Project Wizard in RStudio, I create a new site using a custom theme such as "AlexFinn/simple-a" or "zwbetz-gh/vanilla-bootstrap-hugo-theme" with blogdown::new_site(theme = "AlexFinn/simple-a"). Once created, I add the following to to config.TOML; ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
At this point, all is working as expected and I get a properly formatted example site.
When I press the 'Build Website' button in the Build panel in RStudio again OR I upload to Netlify, for these two themes, my website is rendered with all styling and images removed; black text - bolded and sized - and with a plain white background. With "gcushen/hugo-academic" the colours appear but the images are missing. Nothing appears different with the "road2stat/hugo-tanka".
I would understand this behaviour with the vanilla theme but "simple-a" and "hugo-academic" are mentioned in the blogdown book in chapter 1.6
I am using Hugo 0.53 and blogdown_0.10.1
Build Website is not for rendering the blogdown website, What it does is to render multiple Rmarkdown documents into a website.
You should use Addins -> Serve Site or call the command blogdown::serve_site() instead.
For more information on the difference between rmarkdown::render_site() and blogdown, you can read
help("render_site", package="rmarkdown") and
The rmarkdown official manual
I am unable to display googleVisMotion Chart in Wordpress,RPubs or as RMarkdown. The googleVisMotion Chart works locally on my computer but I am unable to get it to display anywhere else. I tried the method in post
Embedding googleVis charts into a web site
But that did not work for Wordpress when I paste the file in HTML page. When I tried to publish in RPubs using Rmd I just get
"## starting httpd help server ..."
and no chart.
Please let me know how I can display the googleVisMotion chart? Are there other methods?
I saved the chart as a html as suggested in Embedding googleVis charts into a web site. I then hosted the Html page as a Github page (gh-pages) and this worked.