I am trying to add the shiny app into golem structure. Therefore, everything that I am asking here should be in line with golem structure.
Here is the problem:
I cannot add my html into a module. And that is why I get the following error:
cannot open file 'www/workflow_accordion.html': No such file or directory
Here is the module I have added to app_ui (make sure you see the golem structure here https://engineering-shiny.org/golem.html )
#' mod_workflows_ui
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_workflows_ui <- function(id){
ns <- NS(id)
shiny::tabPanel(
"Workflows", icon = icon("list"),
div(
class = "container",
shinyLP::jumbotron(
"Workflows",
"How to use the Bioinformatics for the Bench apps to access specific datasets and answer biological questions",
button = FALSE
),
hr(),
includeHTML("Documentation/workflow_accordion.html"),
br(),
br(),
br()
)
)
tags$footer(
includeHTML("Documentation/footer.html")
)
}
#' mod_workflows_server
#'
#' @noRd
mod_workflows_server <- function(id){
ns <- session$ns
}
This module is added into several parts as per golem structure:
- in app_server script as
mod_workflows_ui("mod_workflows_ui_1")
- in 02_dev - in dev folder as -
golem::add_module(name = "workflow_app", with_test = TRUE)
After that I call in the mod_tutorials in app_ui file like this:
shiny::tabPanel("Workflow", icon = icon("graduation-cap"),mod_workflow_ui("mod_workflow_ui_1"))
,
And then I go int run_dev and just run the app.
Now the issue is that I get this error:
cannot open file 'Documentation/workflow_accordion.html': No such file or directory
What am I missing? Why does it do this and how I can solve it, I am open for other ways of solving this matter.