From db9ca1322e26dde93abcde3ab18349dd61159b7d Mon Sep 17 00:00:00 2001 From: Rish Date: Fri, 4 Sep 2020 17:19:37 +0530 Subject: [PATCH] Updated usage script to include site attribute no issue - To correctly inject the members.js script to any theme, it needs to know the correct site URL to access Ghost APIs. - `data-ghost` attribute is needed on the script to define the correct Site url --- ghost/portal/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghost/portal/README.md b/ghost/portal/README.md index ff576c4a85..01074dbc7e 100644 --- a/ghost/portal/README.md +++ b/ghost/portal/README.md @@ -3,16 +3,20 @@ [![CI Status](https://github.com/TryGhost/members.js/workflows/Test/badge.svg?branch=master)](https://github.com/TryGhost/members.js/actions) [![npm version](https://badge.fury.io/js/%40tryghost%2Fmembers-js.svg)](https://badge.fury.io/js/%40tryghost%2Fmembers-js) -Drop-in script to make the bulk of members work on any theme. +Drop-in script to make the bulk of Ghost membership features work on any theme. ## Usage Add below script in your theme's `default.hbs` just before the end of body tag OR in the code injection footer in Ghost Admin. ```html - + ``` +The `data-ghost` attribute expects the URL for your site which is the only input Portal needs to work with your site's membership data via Ghost APIs. + +NOTE: This is currently under active development and available only behind developer experiments flag - `enableDeveloperExperiments` in Ghost, which needs to be added to config file before starting the server. + ### Custom trigger button By default, the script adds a default floating trigger button on the bottom right of your page which is used to trigger the popup on screen.