Skip to content

Commit

Permalink
feat: add local-scripts support (#949)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarcia360 authored Dec 5, 2023
1 parent 2e5adf5 commit 0c09ae8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/source/configuration/template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ General configuration options.
- Type
- Default Value
- Description
* - ``local_scripts``
- string
- true
- When set to ``true``, this option enables the loading of the ``local-scripts.html`` file from the template. This file is customizable per project, providing a convenient way to insert project-specific tags and scripts.
* - ``scylladb_scripts``
- string
- true
Expand Down
5 changes: 4 additions & 1 deletion sphinx_scylladb_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@
{% endblock %}
{% block scripts %}
{{ script() }}
{% if theme_local_scripts|lower == 'true' %}
{% include 'local-scripts.html' %}
{% endif %}
{% if theme_scylladb_scripts|lower == 'true' %}
{% include 'custom-scripts.html' %}
{% include 'scylladb-scripts.html' %}
{% endif %}
{% endblock %}
<!-- Font Awesome -->
Expand Down
2 changes: 2 additions & 0 deletions sphinx_scylladb_theme/local-scripts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!-- Zendesk tag -->
<meta name='zd-site-verification' content='gq6ltsh3nfex3cnwfy4aj9' />
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- Zendesk tag -->
<meta name='zd-site-verification' content='gq6ltsh3nfex3cnwfy4aj9' />

<!-- Google Tag Manager global -->
<script>
(function (w, d, s, l, i) {
Expand Down
1 change: 1 addition & 0 deletions sphinx_scylladb_theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ hide_version_dropdown =
hide_versions_dropdown =
navigation_depth= -1
site_description = ScyllaDB is an Apache Cassandra-compatible NoSQL data store that can handle 1 million transactions per second on a single server.
local_scripts = true
scylladb_scripts = true
tag_substring_removed = -scylla
versions_unstable =
Expand Down

0 comments on commit 0c09ae8

Please sign in to comment.