From dc4987183738850534d1db6c83b3102c3ec69e46 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 4 Jul 2022 15:33:40 +0200 Subject: [PATCH] Added `{{comments}}` helper refs https://github.com/TryGhost/Team/issues/1664 - added `comments:url` config for a similar setup to Portal - added `{{comments}}` helper that's behind the `comments` labs flag - currently outputs a ` + `); +} + +module.exports = async function commentsLabsWrapper() { + const self = this; + const args = arguments; + + return labs.enabledHelper({ + flagKey: 'comments', + flagName: 'Comments', + helperName: 'comments' + }, () => { + return comments.apply(self, args); + }); +}; + +module.exports.async = true; diff --git a/core/shared/config/defaults.json b/core/shared/config/defaults.json index 155a4930d7..fbe0da2e37 100644 --- a/core/shared/config/defaults.json +++ b/core/shared/config/defaults.json @@ -143,5 +143,8 @@ }, "gravatar": { "url": "https://www.gravatar.com/avatar/{hash}?s={size}&r={rating}&d={_default}" + }, + "comments": { + "url": "https://unpkg.com/@tryghost/comments@~0.0.0/umd/portal.min.js" } }