Skip to content

Commit c016ca5

Browse files
authored
feat: Enable injecting custom html into head (#29917)
1 parent 57a4199 commit c016ca5

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{#
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
#}
19+
20+
{#
21+
This file may be overridden in your custom deployment.
22+
It will be included in the head block in every view in superset and is a
23+
good place to include your custom link, meta, style or script elements.
24+
#}

superset/templates/superset/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
{% block head_js %}
3737
{{ super() }}
38+
{% include "head_custom_extra.html" %}
3839
{{ js_bundle("theme") }}
3940
{% endblock %}
4041

superset/templates/superset/basic.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
%} {% set favicons = appbuilder.app.config['FAVICONS'] %}
1616
<html>
1717
<head>
18+
{% include "head_custom_extra.html" %}
1819
<title>
1920
{% block title %} {% if title %} {{ title }} {% elif appbuilder and
2021
appbuilder.app_name %} {{ appbuilder.app_name }} {% endif %} {% endblock

0 commit comments

Comments
 (0)