2017-04-20 123 views
4

添加生成頁面的頁腳我有以下RMarkdown FlexDashboard文件:如何使用閃亮Flexdashboard

--- 
title: "Some title" 
runtime: shiny 
output: 
    flexdashboard::flex_dashboard: 
    orientation: columns 
    vertical_layout: fill 
--- 

```{r setup, include=FALSE} 
library(flexdashboard) 
``` 

Column {data-width=650} 
----------------------------------------------------------------------- 

### Some chart 

```{r} 
plot(faithful) 
``` 

Column {data-width=650} 
----------------------------------------------------------------------- 

### Chart 2 

```{r} 
``` 

### Chart 3 

```{r} 
``` 

我怎樣才能把跨頁面跨越具有以下內容頁腳?

tags$div(HTML("<footer><small>&copy; Copyright 2017, MyCompany Co.,Ltd</small></footer>")) 

enter image description here

回答

4

你可以把你的頁腳的HTML中footer.html文件,並將其包含在你的降價使用after_body您flexdashboard的body後:

--- 
title: "Some title" 
runtime: shiny 
output: 
    flexdashboard::flex_dashboard: 
    orientation: columns 
    vertical_layout: fill 
    includes: 
     after_body: footer.html 
--- 
+0

我想,通過把'www'裏面的'footer.html'。但是我收到錯誤信息'pandoc:footer.html:openFile:does not exist(沒有這樣的文件或目錄) 錯誤:pandoc文檔轉換失敗,錯誤1 執行停止' – neversaint

+2

不需要將它放在www中'文件夾,它必須與'.Rmd'文件在同一個文件夾中。 – NicE