Ghost/ghost/admin/app/helpers/get-setting.js
Kevin Ansfield 473831ac2b Added image fallback and site icon/title to <GhPostBookmark> (#2401)
no issue

- adds `{{get-setting "key"}}` helper to make settings available in templates without needing a backing class
- updated `<GhPostBookmark>` component
  - if post feature image isn't present, fall back to site cover image
  - add site icon (if present) and title to the details line
  - removed author image

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2022-05-18 19:05:27 +01:00

12 lines
279 B
JavaScript

import Helper from '@ember/component/helper';
import {get} from '@ember/object';
import {inject as service} from '@ember/service';
export default class GetSetting extends Helper {
@service settings;
compute([key = '']) {
return get(this.settings, key);
}
}