summaryrefslogtreecommitdiff
path: root/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js
index d9289dca..247f85f2 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -1,4 +1,6 @@
'use strict'
+const fs = require('fs')
+const path = require('path')
exports.isSQLite = function isSQLite (sequelize) {
return sequelize.options.dialect === 'sqlite'
@@ -23,3 +25,10 @@ exports.getImageMimeType = function getImageMimeType (imagePath) {
return undefined
}
}
+
+exports.isRevealTheme = function isRevealTheme (theme) {
+ if (fs.existsSync(path.join(__dirname, '..', 'public', 'build', 'reveal.js', 'css', 'theme', theme + '.css'))) {
+ return theme
+ }
+ return undefined
+}