split custom-js files with "," instead of ";"

This commit is contained in:
Antoine Vandevenne (anv) 2021-04-02 17:25:04 +02:00
parent bb2948c7e4
commit dbf6320223
6 changed files with 8 additions and 7 deletions

View File

@ -163,9 +163,9 @@ html_favicon = os.path.join(html_theme_path[0], html_theme, 'static', 'img', 'fa
html_static_path = ['static']
html_add_permalinks = '' # Sphinx < 3.5
html_permalinks = True # Sphinx >= 3.5
# The page-specific js files that can be imported with the 'custom-js' metadata directive.
# The page-specific js files that can be imported with the 'custom-js' metadata directive. TODO VFE does it act as a filter? Why are there already some imports not listed here?
html_js_files = []
# The page-specific css files that can be imported with the 'custom-css' metadata directive.
# The page-specific css files that can be imported with the 'custom-css' metadata directive. TODO VFE does it act as a filter? Why are there already some imports not listed here?
html_css_files = []
# PHP lexer option to not require <?php

View File

@ -1,6 +1,6 @@
:code-column:
:custom-css: accounting.css
:custom-js: accounts.js;chart-of-accounts.js;entries.js;misc.js;reconciliation.js
:custom-js: accounts.js,chart-of-accounts.js,entries.js,misc.js,reconciliation.js
==============================================
Accounting Memento For Entrepreneurs (US GAAP)

View File

@ -1,6 +1,6 @@
:code-column:
:custom-css: accounting.css
:custom-js: coa-valuation-anglo-saxon.js;misc.js
:custom-js: coa-valuation-anglo-saxon.js,misc.js
==========================================================
How to do an inventory valuation? (Anglo-Saxon Accounting)

View File

@ -1,6 +1,6 @@
:code-column:
:custom-css: accounting.css
:custom-js: coa-valuation-continental.js;misc.js
:custom-js: coa-valuation-continental.js,misc.js
==========================================================
How to do an inventory valuation? (Continental Accounting)

View File

@ -1,6 +1,6 @@
:code-column:
:custom-css: accounting.css
:custom-js: inventory.js;misc.js
:custom-js: inventory.js,misc.js
====================================
Introduction to Inventory Management

View File

@ -5,6 +5,7 @@
{{ super() }}
{# Allow custom css style import for specific pages #}
{% if 'custom-css' in meta %}
{# TODO VFE this should be wrapped in a loop as custom-css is a comma(, not ;)-separated list #}
{% set link = '_static/css/' + meta['custom-css'] %}
<link rel="stylesheet" href="{{ pathto(link, 1) }}" type="text/css"/>
{% endif %}
@ -20,7 +21,7 @@
integrity="sha512-wsnDgOxfyn4lhblRMHPMuJh+9CnLcwcisda1zLRGNWKh6OiQynebYTyRZYgH+eWLEdNTKak0OD2GAd/S51UhTw=="
crossorigin="anonymous"></script>
<script src="{{ pathto('_static/js/atom.js', 1) }}"></script>
{% set js_files = meta['custom-js'].split(';') %}
{% set js_files = meta['custom-js'].split(',') %}
{% for js_file in js_files %}
{% set link = '_static/js/' + js_file %}
<script src="{{ pathto(link, 1) }}"></script>