# @tryghost/settings-path-manager

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

Latest version **0.1.9** (published 2022-07-22) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @tryghost/settings-path-manager
pnpm add @tryghost/settings-path-manager
yarn add @tryghost/settings-path-manager
bun add @tryghost/settings-path-manager
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.9 |
| Published | 2022-07-22 |
| First published | 2021-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ghost Foundation |
| Maintainers | minimaluminium, ronaldlangeveld, simonbackx, moreofmorris, joeegrigg, sanne-san, djordjevlais, bobvaneck, zimoatghost, allouis, gargol, rishabhgrg, erisds, johnonolan, kevinansfield, cobbspur, aileencgn, jloh, daniellockyer, sam-lord, matthanley, pauladamdavis |

## Links

- npm: https://www.npmjs.com/package/@tryghost/settings-path-manager
- Repository: https://github.com/TryGhost/Utils.git#main
- Homepage: https://github.com/TryGhost/Utils/tree/main#readme
- Issues: https://github.com/TryGhost/Utils/issues
- npm.io page: https://npm.io/package/@tryghost/settings-path-manager

## Dependencies (2)

- [tpl](https://npm.io/package/tpl.md) ^0.3.0
- [date-fns](https://npm.io/package/date-fns.md) ^2.24.0

## Recent versions

- 0.1.9 (latest) — 2022-07-22
- 0.1.8 — 2022-05-24
- 0.1.7 — 2022-05-09
- 0.1.6 — 2022-05-04
- 0.1.5 — 2022-04-21
- 0.1.4 — 2022-03-01
- 0.1.3 — 2022-01-18
- 0.1.2 — 2021-10-22
- 0.1.1 — 2021-09-30
- 0.1.0 — 2021-09-30

## README

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

## Install

`npm install @tryghost/settings-path-manager --save`

or

`yarn add @tryghost/settings-path-manager`


## 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'
```

## Develop

This is a mono repository, managed with [lerna](https://lernajs.io/).

Follow the instructions for the top-level repo.
1. `git clone` this repo & `cd` into it as usual
2. Run `yarn` to install top-level dependencies.


## Run

- `yarn dev`


## Test

- `yarn lint` run just eslint
- `yarn test` run lint and tests




# Copyright & License 

Copyright (c) 2013-2022 Ghost Foundation - Released under the [MIT license](LICENSE).

---
_Source: https://npm.io/package/@tryghost/settings-path-manager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
