0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Updated Readme

Added Usage section
This commit is contained in:
Rish 2020-04-20 23:26:55 +05:30
parent 0539c543a7
commit 86340abdc7

View file

@ -5,6 +5,22 @@
Drop-in script to make the bulk of members work on any theme
## Using in a theme
To load members.js in any Ghost theme, below code needs to be added in theme's `default.hbs` before the end of body tag.
```html
<script src="https://unpkg.com/@tryghost/members-js"></script>
<script>
// Passes Admin URL
var data = {
adminUrl: window.location.origin + "/ghost",
};
// Initializes members.js
window.GhostMembers.initMembersJS(data);
</script>
```
## Basic Setup
1. Clone this repository: