X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/5e265f9d81bcce30949e88850892ea5dacec7386..a9c02cac1fde01ac28dc1241d1e63f85a1ff03a2:/config/config.js?ds=inline diff --git a/config/config.js b/config/config.js index d16ff2d..5a1f793 100644 --- a/config/config.js +++ b/config/config.js @@ -3,7 +3,9 @@ const Path = require('path'); const Getenv = require('getenv'); -const internals = {}; +const internals = { + blogDirectory: Getenv('BLOG_DIRECTORY', Path.resolve(Path.join(__dirname, '../.blog'))), +}; /** * The main configuration object for Blog. It will be used to @@ -25,7 +27,10 @@ const internals = {}; */ module.exports = internals.Config = { maxPosts: Getenv.int('BLOG_MAX_POSTS', 3), - postsDirectory: Getenv('BLOG_POSTS_DIRECTORY', Path.resolve(Path.join(__dirname, '../.posts'))), + blogDirectory: internals.blogDirectory, + postsDirectory: Getenv('BLOG_POSTS_DIRECTORY', Path.resolve(Path.join(internals.blogDirectory, 'posts'))), + archiveDirectory: Getenv('BLOG_ARCHIVE_DIRECTORY', Path.resolve(Path.join(internals.blogDirectory, 'archive'))), staticDirectory: Getenv('BLOG_STATIC_DIRECTORY', Path.resolve(Path.join(__dirname, '../static'))), - templatesDirectory: Getenv('BLOG_TEMPLATES_DIRECTORY', Path.resolve(Path.join(__dirname, '../templates'))) + templatesDirectory: Getenv('BLOG_TEMPLATES_DIRECTORY', Path.resolve(Path.join(__dirname, '../templates'))), + remoteConfig: Getenv('BLOG_REMOTE_CONFIG', Path.resolve(Path.join(__dirname, '../.blogremote'))), };