How to include external css file of a shiny app into flexdashboard

How can I include a external css of a shiny app into the flexdashboard. I have tried putting css file in the YAML header but that didn't work

The style.css is inside www directory



title: 'Dashboard Like a Boss'
    vertical_layout: scroll
    orientation: rows
    runtime: shiny
    css: style.css

ui <- fluidPage(
  tags$head(tags$link(rel = "stylesheet", href = "style.css")),
  tags$p("Hello, world!")

server <- function(input, output, session) {
shinyApp(ui, server)

In the dashboard, the styling doesn't work, but when the shiny app is run in a separate file (e.g., app.R), the styling works.

Begin by creating an external CSS file that contains the custom styles you want to apply to your flexdashboard. Save this file with a ".css" extension (e.g., "styles.css").

I have already created an external .css file and put into a www directory

Already, I've made an external.css file and placed it in the www directory.

I didn't understand.

One way I solved this issue was to put css style into a variable and then put it into the head tag