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:
parent
0539c543a7
commit
86340abdc7
1 changed files with 16 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue