Skip to content

Not possible to include CSS & Javascript #1427

@Konkrad

Description

@Konkrad

Hello,
my app fails when I include both CSS and Javascript, only one of them is loaded

Shiny version: 0.10.1
Example:

# app.py
from shiny import ui

ui.page_fluid(
    ui.head_content(ui.include_css("custom.css"), ui.include_js("script.js")),

    # You can also inline css by passing a dictionary with a `style` element.
    ui.div(
        {"style": "font-weight: bold;"},
        ui.p("Some text!"),
    )
)

What do I expect? That both custom.css and script.js will be added to the HTML.

What happens? One of them generates a 404 error

Screenshot from 2024-05-27 11-20-49

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions