Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Render Xaringan Rmd when using _site.yml file

$
0
0

I have a website set up with three files.

_site.yml

name: Website
navbar:
  title: Website
  right:
    - text: Home
    - text: Info
output:
  html_document:
    theme: flatly
    highlight: tango

index.Rmd

---
title: Welcome
output:
  html_document:
    theme: united
    highlight: textmate
---

This is the index.

test.Rmd

---
title: Test
output:
  html_document:
    theme: united
    highlight: textmate
---

This is the test file.

```{r}
2+2
```

If I run rmarkdown::render("test.Rmd"), I get an HTML that includes the website header. This is similar to output running rmarkdown::render_site().

enter image description here

If I remove _site.yml file and run the same command, I get the regular HTML output:

enter image description here

So, render() must be using the _site.yml when present. Can this be disabled? I would like to create a regular HTML output even when the _site.yml file is present. This is especially an issue when I have xaringan presentations and I do not want them rendered with the website header.


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>