diff options
-rw-r--r-- | app.js | 8 | ||||
-rw-r--r-- | public/css/slide.css | 7 | ||||
-rw-r--r-- | public/js/extra.js | 2 | ||||
-rw-r--r-- | public/views/includes/header.ejs | 2 | ||||
-rw-r--r-- | public/views/includes/scripts.ejs | 2 | ||||
-rw-r--r-- | webpackBaseConfig.js | 3 |
6 files changed, 18 insertions, 6 deletions
@@ -11,6 +11,7 @@ var compression = require('compression') var session = require('express-session'); var SequelizeStore = require('connect-session-sequelize')(session.Store); var fs = require('fs'); +var path = require('path'); var imgur = require('imgur'); var formidable = require('formidable'); var morgan = require('morgan'); @@ -182,11 +183,14 @@ app.use(function(req, res, next) { next(); }); -// redirect url with trailing slashes +// redirect url without trailing slashes app.use(function(req, res, next) { if ("GET" == req.method && req.path.substr(-1) == '/' && req.path.length > 1) { var query = req.url.slice(req.path.length); - res.redirect(301, config.serverurl + req.path.slice(0, -1) + query); + var urlpath = req.path.slice(0, -1); + var serverurl = config.serverurl; + if (config.urlpath) serverurl = serverurl.slice(0, -(config.urlpath.length + 1)); + res.redirect(301, serverurl + urlpath + query); } else { next(); } diff --git a/public/css/slide.css b/public/css/slide.css index c590c9ec..59912230 100644 --- a/public/css/slide.css +++ b/public/css/slide.css @@ -17,6 +17,12 @@ font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } +.reveal.fade { + opacity: unset; + -webkit-transition: unset; + transition: unset; +} + .vimeo, .youtube { position: relative !important; @@ -316,6 +322,7 @@ html, body { .print-pdf .container.hidescrollbar { right: 0; + overflow-y: hidden; } .print-pdf .footer { diff --git a/public/js/extra.js b/public/js/extra.js index 8ca1dcb5..a4eed879 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -1032,7 +1032,7 @@ var gistPlugin = new Plugin( //TOC var tocPlugin = new Plugin( // regexp to match - /^\[TOC\]$/, + /^\[TOC\]$/i, // this function will be called when something matches function (match, utils) { diff --git a/public/views/includes/header.ejs b/public/views/includes/header.ejs index 89f3a0d1..942a89f9 100644 --- a/public/views/includes/header.ejs +++ b/public/views/includes/header.ejs @@ -1,3 +1,3 @@ <% for (var css in htmlWebpackPlugin.files.css) { %> -<link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet"> +<link href="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet"> <% } %> diff --git a/public/views/includes/scripts.ejs b/public/views/includes/scripts.ejs index 4eec75e8..20d4003a 100644 --- a/public/views/includes/scripts.ejs +++ b/public/views/includes/scripts.ejs @@ -1,3 +1,3 @@ <% for (var chunk in htmlWebpackPlugin.files.chunks) { %> -<script src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>" defer></script> +<script src="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.chunks[chunk].entry %>" defer></script> <% } %> diff --git a/webpackBaseConfig.js b/webpackBaseConfig.js index 7d5c3e16..20a21b62 100644 --- a/webpackBaseConfig.js +++ b/webpackBaseConfig.js @@ -329,7 +329,8 @@ module.exports = { output: { path: path.join(__dirname, 'public/build'), publicPath: '/build/', - filename: '[name].js' + filename: '[name].js', + baseUrl: '<%- url %>' }, resolve: { |