mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 10:21:36 +03:00
0a5f600dfe
- we shouldn't need individual LICENSE files because these packages won't be published, so the top-level one applies - also cleaned up README files to remove mentions of Lerna monorepos and install instructions
19 lines
634 B
Markdown
19 lines
634 B
Markdown
# 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:
|
|
```js
|
|
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'
|
|
```
|