Add highlightjs

This commit is contained in:
Oliver Davies 2017-01-07 22:54:36 +00:00
parent c9072b386e
commit b8ef0942cb
8 changed files with 15 additions and 3 deletions

View file

@ -0,0 +1 @@
@import 'code'

View file

@ -0,0 +1,3 @@
code.hljs
background-color: inherit
padding: 0

View file

@ -3,5 +3,6 @@
@import 'base'
@import 'mixins'
@import 'base/all'
@import 'components/all'
@import 'pages/all'

View file

@ -4,6 +4,7 @@
"bootstrap-sass": "~3.3.6",
"compass-breakpoint": "breakpoint-sass#~2.6.1",
"font-awesome": "fontawesome#~4.5.0",
"jquery2": "^2.0.0"
"jquery2": "^2.0.0",
"highlightjs": "^9.9.0"
}
}

View file

@ -59,6 +59,7 @@ gulp.task('fonts', function() {
gulp.task('styles', function() {
return app.sass([
config.bower.path + '/font-awesome/css/font-awesome.css',
config.bower.path + '/highlightjs/styles/default.css',
config.sass.source + config.sass.pattern
], 'site.css');
});
@ -67,6 +68,7 @@ gulp.task('scripts', function() {
return app.js([
config.bower.path + '/jquery2/jquery.js',
config.bower.path + '/bootstrap-sass/assets/javascripts/bootstrap.js',
config.bower.path + '/highlightjs/highlight.pack.js',
config.js.source + config.js.pattern
], 'site.js');
});

View file

@ -8,8 +8,6 @@
<script src="{{ site.url }}/assets/js/site.js"></script>
{% block scripts %}{% endblock %}
{% 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>
{% endif %}

View file

@ -20,5 +20,7 @@
</div>{# .container #}
{% include 'footer' %}
{% block scripts %}{% endblock %}
</body>
</html>

View file

@ -11,3 +11,7 @@
{% include 'post/pager' %}
{% include 'post/about-author' %}
{% endblock %}
{% block scripts %}
<script>hljs.initHighlightingOnLoad();</script>
{% endblock %}