Add highlightjs
This commit is contained in:
parent
c9072b386e
commit
b8ef0942cb
1
assets/sass/base/_all.sass
Normal file
1
assets/sass/base/_all.sass
Normal file
|
@ -0,0 +1 @@
|
||||||
|
@import 'code'
|
3
assets/sass/base/_code.sass
Normal file
3
assets/sass/base/_code.sass
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
code.hljs
|
||||||
|
background-color: inherit
|
||||||
|
padding: 0
|
|
@ -3,5 +3,6 @@
|
||||||
|
|
||||||
@import 'base'
|
@import 'base'
|
||||||
@import 'mixins'
|
@import 'mixins'
|
||||||
|
@import 'base/all'
|
||||||
@import 'components/all'
|
@import 'components/all'
|
||||||
@import 'pages/all'
|
@import 'pages/all'
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"bootstrap-sass": "~3.3.6",
|
"bootstrap-sass": "~3.3.6",
|
||||||
"compass-breakpoint": "breakpoint-sass#~2.6.1",
|
"compass-breakpoint": "breakpoint-sass#~2.6.1",
|
||||||
"font-awesome": "fontawesome#~4.5.0",
|
"font-awesome": "fontawesome#~4.5.0",
|
||||||
"jquery2": "^2.0.0"
|
"jquery2": "^2.0.0",
|
||||||
|
"highlightjs": "^9.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ gulp.task('fonts', function() {
|
||||||
gulp.task('styles', function() {
|
gulp.task('styles', function() {
|
||||||
return app.sass([
|
return app.sass([
|
||||||
config.bower.path + '/font-awesome/css/font-awesome.css',
|
config.bower.path + '/font-awesome/css/font-awesome.css',
|
||||||
|
config.bower.path + '/highlightjs/styles/default.css',
|
||||||
config.sass.source + config.sass.pattern
|
config.sass.source + config.sass.pattern
|
||||||
], 'site.css');
|
], 'site.css');
|
||||||
});
|
});
|
||||||
|
@ -67,6 +68,7 @@ gulp.task('scripts', function() {
|
||||||
return app.js([
|
return app.js([
|
||||||
config.bower.path + '/jquery2/jquery.js',
|
config.bower.path + '/jquery2/jquery.js',
|
||||||
config.bower.path + '/bootstrap-sass/assets/javascripts/bootstrap.js',
|
config.bower.path + '/bootstrap-sass/assets/javascripts/bootstrap.js',
|
||||||
|
config.bower.path + '/highlightjs/highlight.pack.js',
|
||||||
config.js.source + config.js.pattern
|
config.js.source + config.js.pattern
|
||||||
], 'site.js');
|
], 'site.js');
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
<script src="{{ site.url }}/assets/js/site.js"></script>
|
<script src="{{ site.url }}/assets/js/site.js"></script>
|
||||||
|
|
||||||
{% block scripts %}{% endblock %}
|
|
||||||
|
|
||||||
{% if site.google_analytics_tracking_id %}
|
{% if site.google_analytics_tracking_id %}
|
||||||
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '{{ site.google_analytics_tracking_id }}', 'auto'); ga('send', 'pageview');</script>
|
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '{{ site.google_analytics_tracking_id }}', 'auto'); ga('send', 'pageview');</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -20,5 +20,7 @@
|
||||||
</div>{# .container #}
|
</div>{# .container #}
|
||||||
|
|
||||||
{% include 'footer' %}
|
{% include 'footer' %}
|
||||||
|
|
||||||
|
{% block scripts %}{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -11,3 +11,7 @@
|
||||||
{% include 'post/pager' %}
|
{% include 'post/pager' %}
|
||||||
{% include 'post/about-author' %}
|
{% include 'post/about-author' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
Reference in a new issue