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

Use fileExists as a global function instead of filter

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