@tryghost/portal 2.67.11 → 2.68.0

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 CHANGED
@@ -22,6 +22,22 @@ By default, the script adds a default floating trigger button on the bottom righ
22
22
 
23
23
  Its possible to add custom trigger button of your own by adding data attribute `data-portal` to any HTML tag on page, and also specify a specific [page](https://github.com/TryGhost/Ghost/blob/main/ghost/portal/src/pages.js#L13-L22) to open from it by using it as `data-portal=signup`.
24
24
 
25
+ Share modal can be opened with `data-portal="share"` (or `#/share`).
26
+
27
+ Default (zero-config) usage:
28
+ ```html
29
+ <button type="button" data-portal="share">Share</button>
30
+ ```
31
+
32
+ On pages where `{{ghost_head}}` is rendered, Portal will auto-resolve metadata from DOM tags:
33
+ - URL: canonical URL (or current URL fallback)
34
+ - Title: Open Graph title (or document title fallback)
35
+ - Image: Open Graph image (or Twitter image fallback)
36
+
37
+ Troubleshooting missing preview metadata:
38
+ 1. Verify the template includes `{{ghost_head}}`.
39
+ 2. Verify rendered HTML contains canonical + OG/Twitter tags.
40
+
25
41
  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.
26
42
 
27
43
  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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/portal",
3
- "version": "2.67.11",
3
+ "version": "2.68.0",
4
4
  "license": "MIT",
5
5
  "repository": "https://github.com/TryGhost/Ghost",
6
6
  "author": "Ghost Foundation",