That is possible. As an example I made a small website to show that.
But for a larger website you could look at better solutions as e.g. the blogdown package.
As an example I knitted a main_page document and two sub documents and copied the resulting html files to the following structure:
mainpage
pages / doc1
pages / doc2
You can view the website here .
The following three Rmd files were used:
main_page.Rmd:
---
title: "main page"
author: "LisaG1"
date: "4/20/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## My New Media Website
At the moment it contains:
- [doc1](.\pages\doc1.html) First entry
- [doc2](.\pages\doc2.html) Second entry
A lot more to follow !
doc1.Rmd:
---
title: "doc1 page"
author: "LisaG1"
date: "4/20/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
This is doc1 and it contains a reference to [doc2](.\doc2.html) .
A overview of all entries can be found in the [main document](../main_page.html) .
doc2.Rmd:
---
title: "doc2 page"
author: "LisaG1"
date: "4/20/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
This is doc2 and it contains a reference to [doc1](.\doc1.html).
A overview of all entries can be found in the [main document](../main_page.html).