summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorYukai Huang2016-10-12 17:15:59 +0800
committerYukai Huang2016-10-12 17:15:59 +0800
commit2cafe15e854b493d335652755b74674c7e2da4f6 (patch)
tree02925d33a08d7be576ab2efe42e189f301906755 /public
parent91266f1cad25c5f19f332134dd82011f01ce7419 (diff)
Enable production assets hash
Diffstat (limited to '')
-rw-r--r--public/views/foot.ejs3
-rw-r--r--public/views/head.ejs2
-rw-r--r--public/views/includes/header.ejs3
-rw-r--r--public/views/includes/scripts.ejs3
-rw-r--r--public/views/index.ejs4
-rw-r--r--public/views/pretty.ejs5
-rw-r--r--public/views/slide.ejs4
7 files changed, 14 insertions, 10 deletions
diff --git a/public/views/foot.ejs b/public/views/foot.ejs
index 0ce4b85b..abf2da12 100644
--- a/public/views/foot.ejs
+++ b/public/views/foot.ejs
@@ -20,9 +20,8 @@
<script src="<%- url %>/vendor/moment/min/moment-with-locales.js" defer></script>
<script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script>
<% } %>
-<script src="<%- url %>/build/vendor.js" defer></script>
<!--codemirror-->
-<script src="<%- url %>/build/index.js" defer></script>
+<%- include build/index-scripts %>
<script src="<%- url %>/js/google-drive-upload.js" defer></script>
<script src="<%- url %>/js/google-drive-picker.js" defer></script>
<script src="<%- url %>/js/reveal-markdown.js" defer></script>
diff --git a/public/views/head.ejs b/public/views/head.ejs
index 72434892..f4ba108a 100644
--- a/public/views/head.ejs
+++ b/public/views/head.ejs
@@ -36,7 +36,7 @@
<link rel="stylesheet" href="<%- url %>/vendor/showup/showup.css">
<link rel="stylesheet" href="<%- url %>/css/mermaid.css">
<link rel="stylesheet" href="<%- url %>/css/markdown.css">
-<link rel="stylesheet" href="<%- url %>/build/index.css">
+<%- include build/index-header %>
<link rel="stylesheet" href="<%- url %>/css/index.css">
<link rel="stylesheet" href="<%- url %>/css/extra.css">
<link rel="stylesheet" href="<%- url %>/css/slide-preview.css">
diff --git a/public/views/includes/header.ejs b/public/views/includes/header.ejs
new file mode 100644
index 00000000..89f3a0d1
--- /dev/null
+++ b/public/views/includes/header.ejs
@@ -0,0 +1,3 @@
+<% for (var css in htmlWebpackPlugin.files.css) { %>
+<link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
+<% } %>
diff --git a/public/views/includes/scripts.ejs b/public/views/includes/scripts.ejs
new file mode 100644
index 00000000..4eec75e8
--- /dev/null
+++ b/public/views/includes/scripts.ejs
@@ -0,0 +1,3 @@
+<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
+<script src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>" defer></script>
+<% } %>
diff --git a/public/views/index.ejs b/public/views/index.ejs
index f24a039e..0e41db57 100644
--- a/public/views/index.ejs
+++ b/public/views/index.ejs
@@ -27,6 +27,7 @@
<link rel="stylesheet" href="<%- url %>/vendor/select2/select2.css">
<link rel="stylesheet" href="<%- url %>/vendor/select2/select2-bootstrap.css">
<!-- Custom styles for this template -->
+ <%- include build/cover-header %>
<link rel="stylesheet" href="<%- url %>/css/cover.css">
<link rel="stylesheet" href="<%- url %>/css/site.css">
</head>
@@ -193,7 +194,6 @@
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
- <script src="<%- url %>/build/vendor.js" defer></script>
<% if(useCDN) { %>
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" defer></script>
<script src="//cdn.jsdelivr.net/velocity/1.3.1/velocity.min.js" defer></script>
@@ -205,7 +205,7 @@
<script src="<%- url %>/vendor/velocity/velocity.min.js" defer></script>
<script src="<%- url %>/vendor/moment/min/moment-with-locales.min.js" defer></script>
<% } %>
- <script src="<%- url %>/build/locale.js" defer></script>
+ <%- include build/cover-scripts %>
</body>
</html>
diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs
index 6f7c4e72..e617383c 100644
--- a/public/views/pretty.ejs
+++ b/public/views/pretty.ejs
@@ -35,6 +35,7 @@
<link rel="stylesheet" href='<%- url %>/css/extra.css'>
<link rel="stylesheet" href="<%- url %>/css/slide-preview.css">
<link rel="stylesheet" href='<%- url %>/css/site.css'>
+ <%- include build/pretty-header %>
<link rel="stylesheet" href='<%- url %>/build/public.css'>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@@ -97,13 +98,11 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment-with-locales.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/6.0.0/mermaid.min.js" defer></script>
<% } else { %>
-<script src="<%- url %>/build/vendor.js" defer></script>
<script src="<%- url %>/vendor/js-yaml/dist/js-yaml.min.js" defer></script>
<script type="text/javascript" src="<%- url %>/vendor/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML" defer></script>
<script src="<%- url %>/vendor/moment/min/moment-with-locales.js" defer></script>
<script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script>
<% } %>
+<%- include build/pretty-scripts %>
<script src="<%- url %>/js/reveal-markdown.js" defer></script>
-<script src="<%- url %>/build/public.js" defer></script>
-
<%- include ga %>
diff --git a/public/views/slide.ejs b/public/views/slide.ejs
index c463f378..f959a346 100644
--- a/public/views/slide.ejs
+++ b/public/views/slide.ejs
@@ -39,6 +39,7 @@
<link rel="stylesheet" href='<%- url %>/css/extra.css'>
<link rel="stylesheet" href="<%- url %>/css/site.css">
<link rel="stylesheet" href="<%- url %>/css/slide.css">
+ <%- include build/slide-header %>
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
@@ -94,7 +95,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment-with-locales.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/6.0.0/mermaid.min.js" defer></script>
<% } else { %>
- <script src="<%- url %>/build/vendor.js" defer></script>
<script src="<%- url %>/vendor/reveal.js/lib/js/head.min.js"></script>
<script src="<%- url %>/vendor/reveal.js/js/reveal.js"></script>
<script src="<%- url %>/vendor/velocity/velocity.min.js" defer></script>
@@ -103,7 +103,7 @@
<script src="<%- url %>/vendor/moment/min/moment-with-locales.js" defer></script>
<script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script>
<% } %>
- <script src="<%- url %>/build/slide.js" defer></script>
+ <%- include build/slide-scripts %>
</body>
</html>