rittenhop-dev/versions/5.94.2/node_modules/@tryghost/settings-path-manager
2024-09-23 19:40:12 -04:00
..
lib first commit 2024-09-23 19:40:12 -04:00
index.js first commit 2024-09-23 19:40:12 -04:00
package.json first commit 2024-09-23 19:40:12 -04:00
README.md first commit 2024-09-23 19:40:12 -04:00

Settings Path Manager

A library which helps locating configuration paths in Ghost. For example configs for dynamic routes or redirects.

Usage

Example use in to create routes.yaml configuration files:

const config = require('../shared/config'); // or whatever place the storage folders are configured at

const settingsPathManager = new SettingsPathManager({
    type: 'routes',
    paths: [config.getContentPath('settings')]
});

const filePath = settingsPathManager.getDefaultFilePath();

console.log(config.getContentPath('settings')); // -> '/content/data/'
console.log(filePath); // -> '/content/data/routes.yaml'