mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Updated init method to take siteUrl named param
This commit is contained in:
parent
87690f9a03
commit
5b8fe0f643
@ -14,7 +14,7 @@ or
|
|||||||
```js
|
```js
|
||||||
const MembersThemeBindings = require('@tryghost/members-theme-bindings');
|
const MembersThemeBindings = require('@tryghost/members-theme-bindings');
|
||||||
|
|
||||||
MembersThemeBindings.init("http://ghost-site.com/root-ghost-path");
|
MembersThemeBindings.init({siteUrl: "https://ghost-site.com/root-ghost-path"});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Develop
|
## Develop
|
||||||
|
@ -4,8 +4,8 @@ const browserAuth = require('@tryghost/members-browser-auth');
|
|||||||
|
|
||||||
module.exports.init = init;
|
module.exports.init = init;
|
||||||
|
|
||||||
function init(membersUrl) {
|
function init({siteUrl}) {
|
||||||
const auth = browserAuth({membersUrl});
|
const auth = browserAuth({membersUrl: siteUrl + '/members'});
|
||||||
|
|
||||||
const [hashMatch, hash, query] = window.location.hash.match(/^#([^?]+)\??(.*)$/) || [];
|
const [hashMatch, hash, query] = window.location.hash.match(/^#([^?]+)\??(.*)$/) || [];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user