Refactored search configuration

This commit is contained in:
squidfunk 2020-03-27 16:51:27 +01:00
parent 9e74bb7a32
commit 635343544e
7 changed files with 18 additions and 24 deletions

View File

@ -1,10 +1,10 @@
{
"assets/javascripts/bundle.js": "assets/javascripts/bundle.659deb65.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.659deb65.min.js.map",
"assets/javascripts/bundle.js": "assets/javascripts/bundle.b5589e46.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.b5589e46.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.3340e0de.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.3340e0de.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.0ec816aa.min.js",
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.0ec816aa.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.3bc815f0.min.js",
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.3bc815f0.min.js.map",
"assets/stylesheets/main.css": "assets/stylesheets/main.b32d3181.min.css",
"assets/stylesheets/palette.css": "assets/stylesheets/palette.4444686e.min.css"
}

View File

@ -173,12 +173,9 @@
{% include "partials/footer.html" %}
{% endblock %}
</div>
{% block config %}
<script>var __config={}</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/vendor.3340e0de.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.659deb65.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.b5589e46.min.js' | url }}"></script>
{%- set translations = {} -%}
{%- for key in [
"clipboard.copy",
@ -196,13 +193,14 @@
<script id="__lang" type="application/json">
{{- translations | tojson -}}
</script>
{% block config %}{% endblock %}
<script>
app = initialize({
base: "{{ base_url }}",
features: {{ config.theme.features | tojson }},
search: {
worker: "{{ 'assets/javascripts/worker/search.0ec816aa.min.js' | url }}"
}
search: Object.assign({
worker: "{{ 'assets/javascripts/worker/search.3bc815f0.min.js' | url }}"
}, typeof search !== "undefined" && search)
})
</script>
{% for path in config["extra_javascript"] %}

View File

@ -337,13 +337,6 @@
{% endblock %}
</div>
<!-- Application configuration -->
{% block config %}
<script>
var __config = {}
</script>
{% endblock %}
<!-- Theme-related JavaScript -->
{% block scripts %}
<script src="{{ 'assets/javascripts/vendor.js' | url }}"></script>
@ -368,14 +361,17 @@
{{- translations | tojson -}}
</script>
<!-- Application configuration -->
{% block config %}{% endblock %}
<!-- Application initialization -->
<script>
app = initialize({
base: "{{ base_url }}",
features: {{ config.theme.features | tojson }},
search: {
search: Object.assign({
worker: "{{ 'assets/javascripts/worker/search.js' | url }}"
}
}, typeof search !== "undefined" && search)
})
</script>