md-toy-blog
Version:
Very simple Markdown blog: serves your md as html without fancy databases. You will only spend time writing the actual data.
23 lines (22 loc) • 896 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
require("dotenv/config");
var path_1 = require("path");
var loadDictElement = {
factory: function (_a) {
var compiledUserContentDir = _a.compiledUserContentDir, pagesDir = _a.pagesDir;
return function () {
var pageFileAbsPathsList = require(compiledUserContentDir + "/page-file-list");
return pageFileAbsPathsList.map(function (fullPath) {
var splitRes = fullPath.split(path_1.resolve(pagesDir));
var relativePathWithoutPreSlashDotButWithSuffix = splitRes[splitRes.length - 1];
return relativePathWithoutPreSlashDotButWithSuffix;
});
};
},
locateDeps: {
compiledUserContentDir: 'MTB_COMPILED_USER_CONTENT_DIR',
pagesDir: 'MTB_PAGES_DIR',
},
};
exports.default = loadDictElement;