1

I have been looking at https://rstudio.github.io/flexdashboard/articles/theme.html and like the idea of creating a custom theme. I'd rather not have to save a .css file in the same directory of my project, and thought that the idea of editing the theme would suit my preference, but I can't seem to get it to work.

Borrowing code from answers to similar questions:

Bootswatch theme in Shiny Flexdashboard R

and

Flexdashboard - themes and css

I produced:

---
title: "Test"
output: 
  flexdashboard::flex_dashboard:
     theme: lumen

       
---

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

### My Gauge

`r flexdashboard::gauge(15, min = 0, max = 50, href="#details")`

and this successfully knits with the theme. Looking at the code from the rstudio link above and tweaking as found below, however, fails to knit.

---
title: "Test"
output: 
  flexdashboard::flex_dashboard:
     theme:
        version: 4 
        bg: "#101010"
        fg: "#FDF7F7"
        primary: "#ED79F9"
        base_font:
          google: Prompt
        code_font:
          google: JetBrains Mono
     vertical_layout: scroll
     orientation: rows

       
---

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

### My Gauge

`r flexdashboard::gauge(15, min = 0, max = 50, href="#details")`

This yields: enter image description here

I've played with positioning, the order of theme,orientation, and vertical_layout, also placing font names in quotes, but to no avail. How can I adjust this so that the custom theming will work?

Pake
  • 968
  • 9
  • 24

0 Answers0