@tryghost/portal 1.12.4 → 1.12.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -24
- package/package.json +6 -6
- package/umd/portal.min.js +1 -1
- package/umd/portal.min.js.map +1 -1
package/README.md
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
[](https://github.com/TryGhost/portal/actions)
|
|
4
4
|
[](https://badge.fury.io/js/%40tryghost%2Fportal)
|
|
5
5
|
|
|
6
|
-
Drop-in script to make the bulk of Ghost membership features work on any theme.
|
|
6
|
+
[Drop-in script](https://ghost.org/help/setting-up-portal/) to make the bulk of Ghost membership features work on any theme.
|
|
7
7
|
|
|
8
8
|
## Usage
|
|
9
9
|
|
|
10
|
-
Ghost automatically injects
|
|
10
|
+
Ghost automatically injects Portal script on all sites running Ghost 4 or higher.
|
|
11
11
|
|
|
12
12
|
Alternatively, Portal can be enabled on non-ghost pages directly by inserting the below script on the page.
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ Alternatively, Portal can be enabled on non-ghost pages directly by inserting th
|
|
|
15
15
|
<script defer src="https://unpkg.com/@tryghost/portal@latest/umd/portal.min.js" data-ghost="https://mymemberssite.com"></script>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
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.
|
|
18
|
+
The `data-ghost` attribute expects the URL for your Ghost site, which is the only input Portal needs to work with your site's membership data via Ghost APIs.
|
|
19
19
|
|
|
20
20
|
### Custom trigger button
|
|
21
21
|
|
|
@@ -25,6 +25,8 @@ Its possible to add custom trigger button of your own by adding data attribute `
|
|
|
25
25
|
|
|
26
26
|
The script also adds custom class names to this element for open and close state of popup - `gh-portal-open` and `gh-portal-close`, allowing devs to update its UI based on popup state.
|
|
27
27
|
|
|
28
|
+
Refer the [docs](https://ghost.org/help/setup-members/#customize-portal-settings) to read about ways in which Portal can be customized for your site.
|
|
29
|
+
|
|
28
30
|
## Basic Setup
|
|
29
31
|
|
|
30
32
|
1. Clone this repository:
|
|
@@ -40,29 +42,15 @@ cd portal
|
|
|
40
42
|
yarn
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
##
|
|
44
|
-
|
|
45
|
-
Only useful for active UI development without publishing a version on unpkg. Always use the unpkg link for testing latest released portal script.
|
|
46
|
-
|
|
47
|
-
#### In this repo(Portal):
|
|
48
|
-
|
|
49
|
-
- Run `yarn build` to create the minified bundle with your changes at `umd/portal.min.js`
|
|
45
|
+
## For local development
|
|
50
46
|
|
|
51
|
-
|
|
47
|
+
This section is mostly relevant for core team only for active Portal development. Always use the unpkg link for testing/using latest released portal script.
|
|
52
48
|
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
...,
|
|
61
|
-
"portal": {
|
|
62
|
-
"url": "SITE_URL/assets/built/portal.min.js"
|
|
63
|
-
},
|
|
64
|
-
...
|
|
65
|
-
```
|
|
49
|
+
- Run `yarn start:dev` to start Portal in development mode
|
|
50
|
+
- Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
51
|
+
- To use the local Portal script in a local Ghost site
|
|
52
|
+
- Update `config.local.json` in Ghost repo to add "portal" config pointing to local dev server url as instructed on terminal.
|
|
53
|
+
- By default, this uses port `5368` for loading local Portal script on Ghost site. It's also possible to specify a custom port when running the script using - `--port=xxxx`.
|
|
66
54
|
|
|
67
55
|
## Available Scripts
|
|
68
56
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/portal",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"registry": "https://registry.npmjs.org/"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@sentry/react": "6.
|
|
22
|
-
"@sentry/tracing": "6.
|
|
23
|
-
"@testing-library/jest-dom": "5.
|
|
21
|
+
"@sentry/react": "6.15.0",
|
|
22
|
+
"@sentry/tracing": "6.15.0",
|
|
23
|
+
"@testing-library/jest-dom": "5.15.0",
|
|
24
24
|
"@testing-library/react": "12.1.2",
|
|
25
25
|
"@testing-library/user-event": "13.5.0",
|
|
26
26
|
"react": "17.0.2",
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
]
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"chalk": "4.1.
|
|
78
|
+
"chalk": "4.1.2",
|
|
79
79
|
"chokidar": "3.5.2",
|
|
80
80
|
"copy-webpack-plugin": "6.4.1",
|
|
81
|
-
"eslint-plugin-ghost": "2.
|
|
81
|
+
"eslint-plugin-ghost": "2.7.0",
|
|
82
82
|
"minimist": "1.2.5",
|
|
83
83
|
"ora": "5.4.1",
|
|
84
84
|
"rewire": "5.0.0",
|