Skip to content

Commit

Permalink
feat: Enable injecting custom html into head (apache#29917)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje authored Aug 12, 2024
1 parent 57a4199 commit c016ca5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions superset/templates/head_custom_extra.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{#
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
#}

{#
This file may be overridden in your custom deployment.
It will be included in the head block in every view in superset and is a
good place to include your custom link, meta, style or script elements.
#}
1 change: 1 addition & 0 deletions superset/templates/superset/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

{% block head_js %}
{{ super() }}
{% include "head_custom_extra.html" %}
{{ js_bundle("theme") }}
{% endblock %}

Expand Down
1 change: 1 addition & 0 deletions superset/templates/superset/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
%} {% set favicons = appbuilder.app.config['FAVICONS'] %}
<html>
<head>
{% include "head_custom_extra.html" %}
<title>
{% block title %} {% if title %} {{ title }} {% elif appbuilder and
appbuilder.app_name %} {{ appbuilder.app_name }} {% endif %} {% endblock
Expand Down

0 comments on commit c016ca5

Please sign in to comment.