diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-12-09 14:43:41 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-12-09 14:43:41 +0100 |
| commit | c5cbbd3835ccd509179504cdf7d5e74356d7dca5 (patch) | |
| tree | f5588fce8924772a54f599c5636640731bab640d /config | |
| parent | 24de2f063e5dfcad0086d1dc81de3cf012a00e4c (diff) | |
Add rudimentary sync support
Diffstat (limited to 'config')
| -rw-r--r-- | config/config.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/config/config.js b/config/config.js index 476bcfa..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,8 +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'))), - archiveDirectory: Getenv('BLOG_ARCHIVE_DIRECTORY', Path.resolve(Path.join(__dirname, '../.archive'))), + 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'))), }; |