feat: Enable injecting custom html into head (#29917)

This commit is contained in:
Kamil Gabryjelski
2024-08-12 16:13:03 +02:00
committed by GitHub
parent 57a4199f52
commit c016ca5ad9
3 changed files with 26 additions and 0 deletions

View File

@@ -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.
#}

View File

@@ -35,6 +35,7 @@
{% block head_js %}
{{ super() }}
{% include "head_custom_extra.html" %}
{{ js_bundle("theme") }}
{% endblock %}

View File

@@ -15,6 +15,7 @@ governing permissions and limitations under the License. #}
%} {% 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