mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
CLICKHOUSE-3067: less laggy single page documentation
This commit is contained in:
parent
50cbb31406
commit
bb4116236f
10
docs/_templates/layout.html
vendored
10
docs/_templates/layout.html
vendored
@ -72,7 +72,7 @@
|
||||
clickmap:true,
|
||||
trackLinks:true,
|
||||
accurateTrackBounce:true,
|
||||
webvisor:true
|
||||
webvisor: {% if builder != "singlehtml" %}true{% else %}false{% endif %}
|
||||
});
|
||||
} catch(e) { }
|
||||
});
|
||||
@ -93,5 +93,11 @@
|
||||
<div><img src="https://mc.yandex.ru/watch/18343495" style="position:absolute; left:-9999px;" alt=""/></div>
|
||||
</noscript>
|
||||
<!-- /Yandex.Metrika counter -->
|
||||
|
||||
{% if builder == "singlehtml" %}
|
||||
<script type="text/javascript" async="async">
|
||||
$(function() {
|
||||
$(".body").html({{ body|escapejs }});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
{%- endblock %}
|
||||
|
6
docs/_templates/page.html
vendored
Normal file
6
docs/_templates/page.html
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{%- extends "layout.html" %}
|
||||
{% block body %}
|
||||
{% if builder != "singlehtml" %}
|
||||
{{ body }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
@ -292,5 +292,10 @@ texinfo_documents = [
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
||||
def add_filters(app):
|
||||
import json
|
||||
app.builder.templates.environment.filters[str('escapejs')] = lambda x: json.dumps(unicode(x))
|
||||
|
||||
def setup(app):
|
||||
app.add_javascript('custom.js')
|
||||
app.connect(str('builder-inited'), add_filters)
|
||||
|
@ -292,5 +292,10 @@ texinfo_documents = [
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
||||
def add_filters(app):
|
||||
import json
|
||||
app.builder.templates.environment.filters[str('escapejs')] = lambda x: json.dumps(unicode(x))
|
||||
|
||||
def setup(app):
|
||||
app.add_javascript('custom.js')
|
||||
app.connect(str('builder-inited'), add_filters)
|
||||
|
Loading…
Reference in New Issue
Block a user