提交 c2f70210 编写于 作者: S Samy Pessé

Use fileExists as a global function instead of filter

上级 bff2d557
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{% block style %} {% block style %}
{### Include theme css before plugins css ###} {### Include theme css before plugins css ###}
{% if not (config.styles.print|fileExists) %} {% if not fileExists(config.styles.print) %}
{% if options.format %} {% if options.format %}
<link rel="stylesheet" href="{{ (options.format + ".css")|resolveAsset }}"> <link rel="stylesheet" href="{{ (options.format + ".css")|resolveAsset }}">
{% else %} {% else %}
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
{### Custom stylesheets for the book ###} {### Custom stylesheets for the book ###}
{% for type, style in config.styles %} {% for type, style in config.styles %}
{% if (style|fileExists) and (type == "ebook" or type == "print" or type == options.format) %} {% if fileExists(style) and (type == "ebook" or type == "print" or type == options.format) %}
<link rel="stylesheet" href="{{ style|resolveFile }}"> <link rel="stylesheet" href="{{ style|resolveFile }}">
{% endif %} {% endif %}
{% endfor %} {% endfor %}
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
{### Custom stylesheets for the book ###} {### Custom stylesheets for the book ###}
{% for type, style in config.styles %} {% for type, style in config.styles %}
{% if style|fileExists and type == "website" %} {% if fileExists(style) and type == "website" %}
<link rel="stylesheet" href="{{ style|resolveFile }}"> <link rel="stylesheet" href="{{ style|resolveFile }}">
{% endif %} {% endif %}
{% endfor %} {% endfor %}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册