mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
2d1f9fff0c
- there's a weird situation when we have mixed versions of the dependency because different libraries try to compare instances - this brings the usage up to 1.2.21 so we can fix the build for now |
||
---|---|---|
.. | ||
lib | ||
test | ||
.eslintrc.js | ||
index.js | ||
package.json | ||
README.md |
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'