qleroy commented on PR #34093: URL: https://github.com/apache/superset/pull/34093#issuecomment-3073459810
I override default Superset templates to inject additional JavaScript and CSS—primarily to render custom components from our Design System within Markdown/HTML blocks. As part of the Helm deployment, I use the following bootstrap script: ```bash #!/bin/bash # # Download the DSFR design system wget https://github.com/GouvernementFR/dsfr/releases/download/v1.14.0/dsfr-v1.14.0.zip unzip dsfr-v1.14.0.zip -d /app/dsfr # Download DSFR Charts wget https://github.com/GouvernementFR/dsfr-chart/releases/download/v2.0.4/dsfr-chart-v2.0.4.zip unzip dsfr-chart-v2.0.4.zip -d /app/dsfr-chart # Copy the contents to Superset’s static assets directory cp -r /app/dsfr/dist /app/superset/static/assets/dsfr cp -r /app/dsfr-chart/dsfr-chart/dist/DSFRChart /app/superset/static/assets/dsfr-chart # Clone the templates override repository git clone https://github.com/etalab-ia/chartsgouv /app/chartsgouv # Apply custom template overrides cp /app/superset/templates_overrides/superset/public_welcome.html /app/superset/templates/superset/ cp /app/superset/templates_overrides/head_custom_extra.html /app/superset/templates/head_custom_extra.html cp /app/superset/templates_overrides/tail_js_custom_extra.html /app/superset/templates/tail_js_custom_extra.html # Replace error pages with custom versions cp /app/superset/static/assets/local/404.html /app/superset/static/assets/404.html cp /app/superset/static/assets/local/500.html /app/superset/static/assets/500.html ``` For example, the `head_custom_extra.html` file includes: ```html <link rel="stylesheet" type="text/css" href="{{ assets_prefix }}/static/assets/dsfr/dsfr.min.css" /> <link rel="stylesheet" type="text/css" href="{{ assets_prefix }}/static/assets/dsfr/utility/utility.min.css" /> <link rel="stylesheet" type="text/css" href="{{ assets_prefix }}/static/assets/local/css/tail_css_custom_extra.css" /> ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org