Github pages and rstudio

2

I'm using Rstudio to create my documents in the format .Rmd and render in .md with the following function:

rmarkdown::render("2016-09-07-post1.Rmd",output_format = "md_document",encoding = "UTF-8")

The .md generated file is saved in the _posts folder, I make commit and push , and then when I open my blog my post is rendered, however the following happens:

  • Images do not appear;
  • Latex texts are not rendered correctly.

You can view this at fsbmat.github.io

Can anyone help me solve these problems?

    
asked by anonymous 07.09.2016 / 15:22

1 answer

2

The image error is bizarre, the reason was the formatting of the date in the preamble of the file, before my preamble was:

title: "Post1" author: "Fernando de Souza Bastos" date: 07 de setembro de 2016 layout: post comments: true output: html_document: variant: markdown_phpextra+backtick_code_blocks

I've changed to:

title: "Post1" author: "Fernando de Souza Bastos" date: "2016-09-07" layout: post comments: true output: html_document: variant: markdown_phpextra+backtick_code_blocks

And the graph rendered!

Regarding latex, just add the lines of code below in the head.html file that is in the _includes folder:

<script type="text/javascript" async
      src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">

I hope it helps others!

    
07.09.2016 / 19:58