Check css.rel attributes to test str or Stylesheet object

This commit is contained in:
Takeshi KOMIYA 2017-06-03 16:14:17 +09:00
parent a347b0bb98
commit 927a760e0c

View File

@ -106,10 +106,10 @@
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for css in css_files %}
{%- if css is string %}
<link href="{{ pathto(css, 1) }}" type="text/css" />
{%- else %}
{%- if css|attr("rel") %}
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
{%- else %}
<link href="{{ pathto(css, 1) }}" type="text/css" />
{%- endif %}
{%- endfor %}
{%- endmacro %}