Split scripts
This commit is contained in:
parent
733a34f19d
commit
5a78ca28ec
|
@ -68,12 +68,16 @@ gulp.task('styles', function () {
|
|||
});
|
||||
|
||||
gulp.task('scripts', function () {
|
||||
app.js([
|
||||
'node_modules/jquery/dist/jquery.js',
|
||||
config.js.sourceDir + '/**/*.js'
|
||||
], 'main.js')
|
||||
|
||||
app.js([
|
||||
'node_modules/jquery/dist/jquery.js',
|
||||
'node_modules/prismjs/prism.js',
|
||||
'node_modules/prismjs/components/prism-{apacheconf,bsash,css,diff,ini,json,nginx,php,sass,scss,sql,less,twig,xml,yaml}.js',
|
||||
config.js.sourceDir + '/**/*.js'
|
||||
], 'site.js')
|
||||
], 'post.js')
|
||||
});
|
||||
|
||||
gulp.task('watch', ['default'], function () {
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
</footer>
|
||||
</section>
|
||||
|
||||
<script src="{{ site.url }}/assets/js/site.js"></script>
|
||||
<script src="{{ site.url }}/assets/js/main.js"></script>
|
||||
|
||||
{% 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>
|
||||
|
|
|
@ -14,3 +14,7 @@
|
|||
{% block stylesheets %}
|
||||
<link rel="stylesheet" href="{{ site.url }}/assets/css/post.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ site.url }}/assets/js/post.js"></script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue