mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
check if reveal theme exists
This commit is contained in:
parent
e5834c077f
commit
c531d96f66
2 changed files with 11 additions and 1 deletions
|
@ -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(process.cwd(), 'public', 'build', 'reveal.js', 'css', 'theme', theme + '.css'))) {
|
||||
return theme
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue