]> git.r.bdr.sh - rbdr/blog/blame - config/config.js
Update version
[rbdr/blog] / config / config.js
CommitLineData
cf630290
BB
1'use strict';
2
3const Path = require('path');
4const Getenv = require('getenv');
5
6const internals = {};
7
8/**
9 * The main configuration object for Blog. It will be used to
10 * initialize all of the sub-components. It can extend any property of
11 * the blog object.
12 *
13 * @memberof Blog
14 * @typedef {object} tConfiguration
15 * @property {number} maxPosts=3 the max number of posts that can exist
16 * at one time
17 * @property {string} postsDirectory=<project_root>/.posts the location of
18 * the directory where the posts will be stored.
19 * @property {string} staticDirectory=<project_root>/static the location of
20 * the directory where the generated files will be placed. NOTE: There
21 * are some pre-built style files in the default directory, if you
22 * select another one, make sure you include them manually.
23 * @property {string} templatesDirectory=<project_root>/templates the
24 * location of the templates we'll use to generate the index.html
25 */
26module.exports = internals.Config = {
27 maxPosts: Getenv.int('BLOG_MAX_POSTS', 3),
28 postsDirectory: Getenv('BLOG_POSTS_DIRECTORY', Path.resolve(Path.join(__dirname, '../.posts'))),
29 staticDirectory: Getenv('BLOG_STATIC_DIRECTORY', Path.resolve(Path.join(__dirname, '../static'))),
30 templatesDirectory: Getenv('BLOG_TEMPLATES_DIRECTORY', Path.resolve(Path.join(__dirname, '../templates')))
31};