Skip to content

Commit 464c82c

Browse files
committed
Feature: Delegating FontAwesome to some CDN is available now. iissnan#783
1 parent 09be2a1 commit 464c82c

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

_config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -346,23 +346,34 @@ vendors:
346346
jquery:
347347

348348
# Internal version: 2.1.5
349+
# http://fancyapps.com/fancybox/
349350
fancybox:
351+
fancybox_css:
350352

351353
# Internal version: 1.0.6
354+
# https://github.com/ftlabs/fastclick
352355
fastclick:
353356

354357
# Internal version: 1.9.7
358+
# https://github.com/tuupola/jquery_lazyload
355359
lazyload:
356360

357361
# Internal version: 1.2.1
362+
# http://VelocityJS.org
358363
velocity:
359364

360365
# Internal version: 1.2.1
366+
# http://VelocityJS.org
361367
velocity_ui:
362368

363369
# Internal version: 0.7.9
370+
# https://faisalman.github.io/ua-parser-js/
364371
ua_parser:
365372

373+
# Internal version: 4.4.0
374+
# http://fontawesome.io/
375+
fontawesome:
376+
366377

367378
# Assets
368379
css: css

layout/_partials/head.swig

+10-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,20 @@
2424

2525

2626
{% if theme.fancybox %}
27-
<link href="{{ url_for(theme.vendors._internal) }}/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"/>
27+
{% set fancybox_css_uri = url_for(theme.vendors._internal + '/fancybox/source/jquery.fancybox.css?v=2.1.5') %}
28+
{% if theme.vendors.fancybox_css %}
29+
{% set fancybox_css_uri = theme.vendors.fancybox_css %}
30+
{% endif %}
31+
<link href="{{ fancybox_css_uri }}" rel="stylesheet" type="text/css" />
2832
{% endif %}
2933

3034
{% include "./head/external-fonts.swig" %}
3135

32-
<link href="{{ url_for(theme.vendors._internal) }}/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />
36+
{% set font_awesome_uri = url_for(theme.vendors._internal + '/font-awesome/css/font-awesome.min.css?v=4.4.0') %}
37+
{% if theme.vendors.fontawesome %}
38+
{% set font_awesome_uri = theme.vendors.fontawesome %}
39+
{% endif %}
40+
<link href="{{ font_awesome_uri }}" rel="stylesheet" type="text/css" />
3341

3442
<link href="{{ url_for(theme.css) }}/main.css?v={{ theme.version }}" rel="stylesheet" type="text/css" />
3543

0 commit comments

Comments
 (0)