Skip to content

Instantly share code, notes, and snippets.

@berkorbay
Created December 22, 2021 22:27
Show Gist options
  • Save berkorbay/fb7a5f2647b0f749abfc8e75cf9b1ebb to your computer and use it in GitHub Desktop.
Save berkorbay/fb7a5f2647b0f749abfc8e75cf9b1ebb to your computer and use it in GitHub Desktop.
RMarkdown include an HTML fragment within an HTML fragment and how to solve <!DOCTYPE html> print problem.
---
output:
html_fragment:
self_contained: false
always_allow_html: true
---
```{=html}
<!DOCTYPE html>
```
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<title> MWE </title>
</head>
<body>
<div class="container-fluid main-container">
<div id="header">
<h1 class="title toc-ignore">MWE</h1>
</div>
```{r child='mwe_child_fragment.Rmd'}
```
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment