mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 18:01:36 +03:00
a9050f68ea
no issue - Removed deprecated 'blog' reference from frontend data. The alias (site->blog) stays till next version (v4) as it's not leaving much of technical debt but would ease the migration process for anybody still using it. - The follow up to this is substitute of all references to `options.data.blog` with `options.data.site` in "frontend" - Fixed test utils helper to use `site` instead of `blog` - Removed 0.1 flag checks in {{get}} helper - Removed user aliasing from {{get}} helper - Removed unused translation for {{get}} helper - Added a note to excerpt changes in metadata for future reference - Removed page alias used in description helper. The mix of page context with post object in the metadata was only possible in v0.1 - Changed mock in ghost_head helper to use v2 - Removed unneeded test for body class helper
20 lines
575 B
JavaScript
20 lines
575 B
JavaScript
// # Facebook URL Helper
|
|
// Usage: `{{facebook_url}}` or `{{facebook_url author.facebook}}`
|
|
//
|
|
// Output a url for a facebook username
|
|
const {socialUrls, localUtils} = require('./proxy');
|
|
|
|
// We use the name facebook_url to match the helper for consistency:
|
|
module.exports = function facebook_url(username, options) { // eslint-disable-line camelcase
|
|
if (!options) {
|
|
options = username;
|
|
username = localUtils.findKey('facebook', this, options.data.site);
|
|
}
|
|
|
|
if (username) {
|
|
return socialUrls.facebook(username);
|
|
}
|
|
|
|
return null;
|
|
};
|