Minimal Bookdown added jpg reference not rendering image - r

I and attempting to render a single jpg image using the minimal Bookdown setup.
Everything builds and knits fine in the original minimal bookdown state. When I add this one line of code just below '# Prerequisites,' the book incurs errors during the build process.
I've researched the error solutions to extent of my brain cells but cannot seem to locate the solution. The line of code works perfectly fine in R markdown, so it's not a file or directory does not exist issue.
When I knit the book, it produces the image in the proper position.
![](/Users/brianlee/Dropbox (Personal)/__bookdown_dfc/__derivations/flow_diagram.jpg)
Error messages are provided in linked image[![enter image description here][1]][1].
[1]: https://i.stack.imgur.com/K0u4B.jpg

Try to use HTML instead <img src= "/Users/brianlee/Dropbox (Personal)/__bookdown_dfc/__derivations/flow_diagram.jpg">

Related

kable table not correctly displayed on github

I am working on a color package for the company I work for. It contains a table to see the color of the company in an interactive way, with the actual color under the hex code (see picture below).
This works fine as long as I compile my rmd locally. However, when the file is compiled on Github, the underlying color disappears (see https://github.com/qwertzlbry/bsscol or picture below).
Does anyone know why Github is not displaying my table correctly?
The entire rmd file including all codes can be found at https://github.com/qwertzlbry/bsscol, any help on this topic is greatly appreciated.
It appears the differences are due to two different renders. From what I can see, kable_paper outputs a Markdown text-document. When you are viewing it, something is rendering it into HTML, where the <span>-tag is allowed.
In the second screenshot, on GitHub, it is GitHub that is rendering the Markdown document into HTML. Alas, the GitHub Flavored Markdown does not support the <span> tag. So it simply ignores it.

chunk code plot from rmd file not shown in the post of blogdown

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?

Controlling the size of the HTML file when saving file

can someone help me to resize an HTML file produce with plotly in Jupyter?
This is the code I am using to save to an HTML file:
fig.write_html("D:\jupyter\image.html")
It works but now I want to control for the size. Here (https://plotly.com/python/interactive-html-export/) is suggested how to do it but I cannot get my head around to how specifically write the code to not get a big image
If you type fig.write_html? inside a cell you can read all the documentation, which is a little more explicit than the document you posted. In short
fig.write_html("output.html",
include_plotlyjs="cdn")
Should produce a file ~3MB smaller than the one you are getting now as this option point to the plotly.js online instead of include it on the output.

How do I host an interactive (shiny) knitr/rmarkdown doc on GitHub Pages?

I have an .rmd file containing working code for a Shiny interactive knitr/rmarkdown doc. I want this doc to run via GitHub pages.
How do I do this? (Can someone walk me through the steps clearly and fully).
I understand I have to create a gh-pages branch and upload the files there. However, I don't understand what to do with my .rmd file. Do I simply just resave it as an .html file? Or does an html file have to contain something in addition to the rmd file?
Please help explain this to me -- I've spent all day trying to figure this out, but I can;t get anything to work right :(.
Prior effort: I tried following the lead given by this SO.post, but the best I can get is a screen full of block text. No formatting, code or images show up. Just the whole document's text.

R knitr html file picture locations when compiling through RStudio

When I make my knitr document, I see the html file in my directory. I load the file and it looks great.
However, I'm curious where the pictures are:
It gives me locations like:
img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQAAAAYACAYAAAAjFnetAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQ ...."
Where exactly is the image?
This IS the image directly encoded in html. http://en.wikipedia.org/wiki/Data_URI_scheme
see f.e. this stack overflow question: Embedding Base64 Images
kind greetings

Resources