ghostcn 1.0.0 → 1.0.1

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.
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "author-card",
3
+ "type": "components:ui",
4
+ "description": "Author bio box featuring avatar, biography, social links, and post counts.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ {
9
+ "name": "author-card.hbs",
10
+ "type": "partial",
11
+ "target": "partials/components/author-card.hbs",
12
+ "content": "{{!-- \n Component: Author Card\n Usage: In post context {{> \"components/author-card\"}} or {{#primary_author}}{{> \"components/author-card\"}}{{/primary_author}}\n--}}\n<section class=\"gh-author-card bg-slate-50 border border-slate-200 rounded-xl p-6 my-8 max-w-2xl mx-auto flex flex-col sm:flex-row items-center sm:items-start gap-5\">\n {{#if profile_image}}\n <img src=\"{{img_url profile_image size=\"m\"}}\" alt=\"{{name}}\" class=\"gh-author-avatar w-20 h-20 rounded-full object-cover border-2 border-white shadow\" />\n {{else}}\n <div class=\"gh-author-avatar-fallback w-20 h-20 rounded-full bg-indigo-100 text-indigo-600 flex items-center justify-center font-bold text-2xl border-2 border-white shadow\">\n {{name.[0]}}\n </div>\n {{/if}}\n\n <div class=\"gh-author-details flex-1 text-center sm:text-left\">\n <div class=\"flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-2\">\n <h4 class=\"gh-author-name text-xl font-bold text-slate-900\">\n <a href=\"{{url}}\" class=\"hover:text-indigo-600 transition-colors\">{{name}}</a>\n </h4>\n {{#if count.posts}}\n <span class=\"gh-author-post-count text-xs text-slate-500 bg-slate-200 px-2.5 py-1 rounded-full font-medium\">\n {{plural count.posts empty=\"0 posts\" singular=\"% post\" plural=\"% posts\"}}\n </span>\n {{/if}}\n </div>\n\n {{#if bio}}\n <p class=\"gh-author-bio text-slate-600 text-sm mb-4 leading-relaxed\">{{bio}}</p>\n {{/if}}\n\n <div class=\"gh-author-meta flex flex-wrap items-center justify-center sm:justify-start gap-4 text-xs text-slate-500\">\n {{#if location}}\n <span class=\"gh-author-location flex items-center gap-1\">?? {{location}}</span>\n {{/if}}\n {{#if website}}\n <a href=\"{{website}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"gh-author-link text-indigo-600 hover:underline\">Website</a>\n {{/if}}\n {{#if (social_url type=\"twitter\")}}\n <a href=\"{{social_url type=\"twitter\"}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"gh-author-link text-indigo-600 hover:underline\">Twitter/X</a>\n {{/if}}\n {{#if (social_url type=\"facebook\")}}\n <a href=\"{{social_url type=\"facebook\"}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"gh-author-link text-indigo-600 hover:underline\">Facebook</a>\n {{/if}}\n </div>\n </div>\n</section>"
13
+ },
14
+ {
15
+ "name": "author-card.css",
16
+ "type": "style",
17
+ "target": "assets/css/components/author-card.css",
18
+ "content": "/* Ghost UI: Author Card Styles (Vanilla CSS fallback) */\n.gh-author-card {\n background-color: var(--ghost-card-bg, #f8fafc);\n border: 1px solid var(--ghost-border, #e2e8f0);\n border-radius: 0.75rem;\n padding: 1.5rem;\n margin: 2rem auto;\n max-width: 42rem;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1.25rem;\n}\n\n@media (min-width: 640px) {\n .gh-author-card {\n flex-direction: row;\n align-items: flex-start;\n }\n}\n\n.gh-author-avatar {\n width: 5rem;\n height: 5rem;\n border-radius: 9999px;\n object-fit: cover;\n border: 2px solid #ffffff;\n box-shadow: 0 1px 3px rgba(0,0,0,0.1);\n}\n\n.gh-author-avatar-fallback {\n width: 5rem;\n height: 5rem;\n border-radius: 9999px;\n background-color: #e0e7ff;\n color: #4f46e5;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 1.5rem;\n font-weight: 700;\n}\n\n.gh-author-details {\n flex: 1;\n text-align: center;\n}\n\n@media (min-width: 640px) {\n .gh-author-details {\n text-align: left;\n }\n}\n\n.gh-author-name {\n font-size: 1.25rem;\n font-weight: 700;\n margin: 0;\n}\n\n.gh-author-name a {\n color: var(--ghost-heading-color, #0f172a);\n text-decoration: none;\n}\n\n.gh-author-name a:hover {\n color: var(--ghost-accent-color, #4f46e5);\n}\n\n.gh-author-bio {\n color: var(--ghost-text-muted, #475569);\n font-size: 0.875rem;\n line-height: 1.5;\n margin: 0.5rem 0 1rem;\n}\n\n.gh-author-meta {\n display: flex;\n flex-wrap: wrap;\n gap: 1rem;\n font-size: 0.75rem;\n color: #64748b;\n}\n\n.gh-author-meta a {\n color: var(--ghost-accent-color, #4f46e5);\n text-decoration: none;\n}\n\n.gh-author-meta a:hover {\n text-decoration: underline;\n}"
19
+ }
20
+ ],
21
+ "gscan": {
22
+ "rules_satisfied": [
23
+ "GS010-PJ-VALID"
24
+ ],
25
+ "notes": "Uses standard Ghost author helpers (profile_image, img_url, plural, url, bio)."
26
+ }
27
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "newsletter-form",
3
+ "type": "components:ui",
4
+ "description": "A native Ghost members subscription form.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ {
9
+ "name": "newsletter-form.hbs",
10
+ "type": "partial",
11
+ "target": "partials/components/newsletter-form.hbs",
12
+ "content": "{{!-- \n Component: Newsletter Form\n Usage: {{> \"components/newsletter-form\" title=\"Subscribe!\"}} \n--}}\n<section class=\"gh-newsletter-form bg-slate-50 border border-slate-200 p-8 rounded-xl text-center max-w-2xl mx-auto my-8\">\n <h3 class=\"gh-newsletter-title text-2xl font-bold mb-2 text-slate-900\">{{#if title}}{{title}}{{else}}Subscribe to our newsletter{{/if}}</h3>\n <p class=\"gh-newsletter-desc text-slate-600 mb-6\">{{#if description}}{{description}}{{else}}Get the latest posts delivered right to your inbox.{{/if}}</p>\n \n {{!-- Ghost native members form handling --}}\n <form data-members-form=\"subscribe\" class=\"gh-newsletter-fields flex flex-col sm:flex-row gap-3 max-w-md mx-auto relative\">\n <label for=\"gh-email\" class=\"sr-only\">Email address</label>\n <input \n data-members-email \n type=\"email\" \n id=\"gh-email\" \n required \n placeholder=\"jamie@example.com\" \n class=\"gh-newsletter-input flex-1 px-4 py-2 border border-slate-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500\" \n />\n <button type=\"submit\" class=\"gh-newsletter-btn bg-indigo-600 text-white px-6 py-2 rounded-lg font-medium hover:bg-indigo-700 transition-colors flex items-center justify-center\">\n <span class=\"button-text\">Subscribe</span>\n </button>\n \n {{!-- Ghost automatic states (hidden by default, shown via Ghost Portal JS) --}}\n <div class=\"gh-newsletter-msg-success message-success hidden absolute -bottom-8 left-0 right-0 text-sm text-green-600 font-medium\" data-members-success>\n Success! Check your inbox to confirm.\n </div>\n <div class=\"gh-newsletter-msg-error message-error hidden absolute -bottom-8 left-0 right-0 text-sm text-red-600 font-medium\" data-members-error>\n Please enter a valid email address.\n </div>\n </form>\n</section>"
13
+ },
14
+ {
15
+ "name": "newsletter-form.css",
16
+ "type": "style",
17
+ "target": "assets/css/components/newsletter-form.css",
18
+ "content": "/* Ghost UI: Newsletter Form Styles (Vanilla CSS fallback) */\n.gh-newsletter-form {\n background-color: var(--ghost-accent-bg, #f8fafc);\n border: 1px solid var(--ghost-border, #e2e8f0);\n border-radius: 0.75rem;\n padding: 2rem;\n text-align: center;\n max-width: 42rem;\n margin: 2rem auto;\n}\n\n.gh-newsletter-title {\n font-size: 1.5rem;\n font-weight: 700;\n margin-bottom: 0.5rem;\n color: var(--ghost-heading-color, #0f172a);\n}\n\n.gh-newsletter-desc {\n color: var(--ghost-text-muted, #475569);\n margin-bottom: 1.5rem;\n}\n\n.gh-newsletter-fields {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n max-width: 28rem;\n margin: 0 auto;\n position: relative;\n}\n\n@media (min-width: 640px) {\n .gh-newsletter-fields {\n flex-direction: row;\n }\n}\n\n.gh-newsletter-input {\n flex: 1;\n padding: 0.625rem 1rem;\n border: 1px solid #cbd5e1;\n border-radius: 0.5rem;\n font-size: 1rem;\n outline: none;\n}\n\n.gh-newsletter-input:focus {\n border-color: var(--ghost-accent-color, #4f46e5);\n box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);\n}\n\n.gh-newsletter-btn {\n background-color: var(--ghost-accent-color, #4f46e5);\n color: #ffffff;\n padding: 0.625rem 1.5rem;\n border-radius: 0.5rem;\n font-weight: 500;\n border: none;\n cursor: pointer;\n transition: background-color 0.15s ease;\n}\n\n.gh-newsletter-btn:hover {\n opacity: 0.9;\n}\n\n.gh-newsletter-msg-success,\n.gh-newsletter-msg-error {\n position: absolute;\n bottom: -2rem;\n left: 0;\n right: 0;\n font-size: 0.875rem;\n}\n\n.gh-newsletter-msg-success {\n color: #16a34a;\n}\n\n.gh-newsletter-msg-error {\n color: #dc2626;\n}\n"
19
+ }
20
+ ],
21
+ "gscan": {
22
+ "rules_satisfied": ["GS010-PJ-VALID", "GS050-MEMBERS-FORM"],
23
+ "notes": "Uses Ghost's native `data-members-form` attributes. No custom JS required."
24
+ }
25
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "post-card",
3
+ "type": "components:ui",
4
+ "description": "Post preview card with feature image, primary tag, excerpt, and reading time.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ {
9
+ "name": "post-card.hbs",
10
+ "type": "partial",
11
+ "target": "partials/components/post-card.hbs",
12
+ "content": "{{!-- \n Component: Post Card\n Usage: Inside {{#foreach posts}} ... {{> \"components/post-card\"}} ... {{/foreach}}\n--}}\n<article class=\"gh-post-card group bg-white border border-slate-200 rounded-xl overflow-hidden hover:shadow-lg transition-all duration-200 flex flex-col\">\n {{#if feature_image}}\n <a href=\"{{url}}\" class=\"gh-post-card-image block aspect-video overflow-hidden bg-slate-100\">\n <img src=\"{{img_url feature_image size=\"m\"}}\" alt=\"{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}\" class=\"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300\" loading=\"lazy\" />\n </a>\n {{/if}}\n\n <div class=\"gh-post-card-content p-5 flex-1 flex flex-col justify-between\">\n <div>\n <div class=\"flex items-center gap-2 mb-2 text-xs font-semibold\">\n {{#if primary_tag}}\n <a href=\"{{primary_tag.url}}\" class=\"gh-post-card-tag text-indigo-600 uppercase tracking-wider hover:underline\">{{primary_tag.name}}</a>\n <span class=\"text-slate-300\">&bull;</span>\n {{/if}}\n <span class=\"gh-post-card-reading-time text-slate-500\">{{reading_time}}</span>\n </div>\n\n <h3 class=\"gh-post-card-title text-xl font-bold text-slate-900 mb-2 leading-snug group-hover:text-indigo-600 transition-colors\">\n <a href=\"{{url}}\">{{title}}</a>\n </h3>\n\n {{#if excerpt}}\n <p class=\"gh-post-card-excerpt text-slate-600 text-sm line-clamp-3 mb-4 leading-relaxed\">{{excerpt words=\"25\"}}</p>\n {{/if}}\n </div>\n\n <div class=\"gh-post-card-footer pt-4 border-t border-slate-100 flex items-center justify-between text-xs text-slate-500\">\n <div class=\"flex items-center gap-2\">\n {{#primary_author}}\n <span>{{name}}</span>\n {{/primary_author}}\n </div>\n <time datetime=\"{{date format=\"YYYY-MM-DD\"}}\">{{date format=\"D MMM YYYY\"}}</time>\n </div>\n </div>\n</article>"
13
+ },
14
+ {
15
+ "name": "post-card.css",
16
+ "type": "style",
17
+ "target": "assets/css/components/post-card.css",
18
+ "content": "/* Ghost UI: Post Card Styles (Vanilla CSS fallback) */\n.gh-post-card {\n background-color: var(--ghost-card-bg, #ffffff);\n border: 1px solid var(--ghost-border, #e2e8f0);\n border-radius: 0.75rem;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n}\n\n.gh-post-card:hover {\n transform: translateY(-2px);\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);\n}\n\n.gh-post-card-image {\n aspect-ratio: 16 / 9;\n overflow: hidden;\n display: block;\n background-color: #f1f5f9;\n}\n\n.gh-post-card-image img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: transform 0.3s ease;\n}\n\n.gh-post-card:hover .gh-post-card-image img {\n transform: scale(1.03);\n}\n\n.gh-post-card-content {\n padding: 1.25rem;\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.gh-post-card-tag {\n color: var(--ghost-accent-color, #4f46e5);\n font-size: 0.75rem;\n font-weight: 600;\n text-decoration: none;\n text-transform: uppercase;\n}\n\n.gh-post-card-tag:hover {\n text-decoration: underline;\n}\n\n.gh-post-card-title {\n font-size: 1.25rem;\n font-weight: 700;\n margin: 0.5rem 0;\n line-height: 1.35;\n}\n\n.gh-post-card-title a {\n color: var(--ghost-heading-color, #0f172a);\n text-decoration: none;\n}\n\n.gh-post-card-title a:hover {\n color: var(--ghost-accent-color, #4f46e5);\n}\n\n.gh-post-card-excerpt {\n color: var(--ghost-text-muted, #475569);\n font-size: 0.875rem;\n line-height: 1.5;\n margin-bottom: 1rem;\n}\n\n.gh-post-card-footer {\n padding-top: 1rem;\n border-top: 1px solid var(--ghost-border, #f1f5f9);\n display: flex;\n justify-content: space-between;\n font-size: 0.75rem;\n color: #64748b;\n}"
19
+ }
20
+ ],
21
+ "gscan": {
22
+ "rules_satisfied": [
23
+ "GS010-PJ-VALID"
24
+ ],
25
+ "notes": "Uses standard Ghost post helpers (feature_image, primary_tag, reading_time, excerpt, date)."
26
+ }
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "pricing-table",
3
+ "type": "components:ui",
4
+ "description": "Membership tiers and pricing plans with native Ghost Portal checkout triggers.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ {
9
+ "name": "pricing-table.hbs",
10
+ "type": "partial",
11
+ "target": "partials/components/pricing-table.hbs",
12
+ "content": "{{!-- \n Component: Pricing Table\n Usage: {{> \"components/pricing-table\" title=\"Choose your plan\"}} \n--}}\n<section class=\"gh-pricing bg-white py-12 px-4 sm:px-6 lg:px-8 max-w-5xl mx-auto my-8\">\n <div class=\"text-center mb-10\">\n <h2 class=\"gh-pricing-title text-3xl font-extrabold text-slate-900 mb-3\">{{#if title}}{{title}}{{else}}Choose the right plan for you{{/if}}</h2>\n <p class=\"gh-pricing-desc text-slate-600 max-w-xl mx-auto\">{{#if description}}{{description}}{{else}}Unlock unlimited access to exclusive content, newsletters, and community discussions.{{/if}}</p>\n </div>\n\n <div class=\"gh-pricing-grid grid grid-cols-1 md:grid-cols-3 gap-8\">\n {{!-- Free Tier --}}\n <div class=\"gh-pricing-card border border-slate-200 rounded-2xl p-6 bg-slate-50 flex flex-col justify-between hover:shadow-md transition-shadow\">\n <div>\n <h3 class=\"text-xl font-bold text-slate-900 mb-2\">Free</h3>\n <p class=\"text-slate-500 text-sm mb-4\">Preview public posts</p>\n <div class=\"text-3xl font-extrabold text-slate-900 mb-6\">$0 <span class=\"text-sm font-normal text-slate-500\">/ forever</span></div>\n <ul class=\"space-y-3 text-sm text-slate-600 mb-6\">\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Access to public posts</li>\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Regular email newsletters</li>\n </ul>\n </div>\n <a href=\"#/portal/signup/free\" data-portal=\"signup/free\" class=\"gh-pricing-btn block w-full text-center py-2.5 px-4 rounded-lg font-medium border border-slate-300 text-slate-700 bg-white hover:bg-slate-100 transition-colors\">\n Sign up free\n </a>\n </div>\n\n {{!-- Monthly Tier (Featured) --}}\n <div class=\"gh-pricing-card gh-pricing-card-featured border-2 border-indigo-600 rounded-2xl p-6 bg-white flex flex-col justify-between shadow-lg relative\">\n <span class=\"gh-pricing-badge absolute -top-3 left-1/2 -translate-x-1/2 bg-indigo-600 text-white text-xs font-semibold px-3 py-1 rounded-full uppercase tracking-wider\">Most Popular</span>\n <div>\n <h3 class=\"text-xl font-bold text-slate-900 mb-2\">Monthly</h3>\n <p class=\"text-slate-500 text-sm mb-4\">Full access billed monthly</p>\n <div class=\"text-3xl font-extrabold text-indigo-600 mb-6\">$5 <span class=\"text-sm font-normal text-slate-500\">/ month</span></div>\n <ul class=\"space-y-3 text-sm text-slate-600 mb-6\">\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Full archive access</li>\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Member-only newsletter</li>\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Member community comments</li>\n </ul>\n </div>\n <a href=\"#/portal/signup/monthly\" data-portal=\"signup/monthly\" class=\"gh-pricing-btn gh-pricing-btn-primary block w-full text-center py-2.5 px-4 rounded-lg font-medium text-white bg-indigo-600 hover:bg-indigo-700 transition-colors shadow-sm\">\n Subscribe monthly\n </a>\n </div>\n\n {{!-- Annual Tier --}}\n <div class=\"gh-pricing-card border border-slate-200 rounded-2xl p-6 bg-slate-50 flex flex-col justify-between hover:shadow-md transition-shadow\">\n <div>\n <h3 class=\"text-xl font-bold text-slate-900 mb-2\">Annual</h3>\n <p class=\"text-slate-500 text-sm mb-4\">Save 20% with annual billing</p>\n <div class=\"text-3xl font-extrabold text-slate-900 mb-6\">$48 <span class=\"text-sm font-normal text-slate-500\">/ year</span></div>\n <ul class=\"space-y-3 text-sm text-slate-600 mb-6\">\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> Everything in Monthly</li>\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> 2 months free</li>\n <li class=\"flex items-center gap-2\"><span>&#10003;</span> VIP priority support</li>\n </ul>\n </div>\n <a href=\"#/portal/signup/yearly\" data-portal=\"signup/yearly\" class=\"gh-pricing-btn block w-full text-center py-2.5 px-4 rounded-lg font-medium border border-slate-300 text-slate-700 bg-white hover:bg-slate-100 transition-colors\">\n Subscribe yearly\n </a>\n </div>\n </div>\n</section>"
13
+ },
14
+ {
15
+ "name": "pricing-table.css",
16
+ "type": "style",
17
+ "target": "assets/css/components/pricing-table.css",
18
+ "content": "/* Ghost UI: Pricing Table Styles (Vanilla CSS fallback) */\n.gh-pricing {\n max-width: 64rem;\n margin: 2rem auto;\n padding: 2rem 1rem;\n}\n\n.gh-pricing-title {\n font-size: 1.875rem;\n font-weight: 800;\n text-align: center;\n color: var(--ghost-heading-color, #0f172a);\n margin-bottom: 0.75rem;\n}\n\n.gh-pricing-desc {\n text-align: center;\n color: var(--ghost-text-muted, #475569);\n margin-bottom: 2.5rem;\n}\n\n.gh-pricing-grid {\n display: grid;\n grid-template-columns: 1fr;\n gap: 2rem;\n}\n\n@media (min-width: 768px) {\n .gh-pricing-grid {\n grid-template-columns: repeat(3, 1fr);\n }\n}\n\n.gh-pricing-card {\n border: 1px solid var(--ghost-border, #e2e8f0);\n border-radius: 1rem;\n padding: 1.5rem;\n background-color: var(--ghost-card-bg, #f8fafc);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n position: relative;\n}\n\n.gh-pricing-card-featured {\n border: 2px solid var(--ghost-accent-color, #4f46e5);\n background-color: #ffffff;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);\n}\n\n.gh-pricing-badge {\n position: absolute;\n top: -0.75rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--ghost-accent-color, #4f46e5);\n color: #ffffff;\n font-size: 0.75rem;\n font-weight: 600;\n padding: 0.25rem 0.75rem;\n border-radius: 9999px;\n}\n\n.gh-pricing-btn {\n display: block;\n width: 100%;\n text-align: center;\n padding: 0.625rem 1rem;\n border-radius: 0.5rem;\n font-weight: 500;\n text-decoration: none;\n border: 1px solid #cbd5e1;\n color: #334155;\n background-color: #ffffff;\n margin-top: 1.5rem;\n transition: background-color 0.15s ease;\n}\n\n.gh-pricing-btn:hover {\n background-color: #f1f5f9;\n}\n\n.gh-pricing-btn-primary {\n background-color: var(--ghost-accent-color, #4f46e5);\n border-color: var(--ghost-accent-color, #4f46e5);\n color: #ffffff;\n}\n\n.gh-pricing-btn-primary:hover {\n opacity: 0.9;\n}"
19
+ }
20
+ ],
21
+ "gscan": {
22
+ "rules_satisfied": [
23
+ "GS010-PJ-VALID"
24
+ ],
25
+ "notes": "Uses Ghost native data-portal attributes for seamless checkout without third-party scripts."
26
+ }
27
+ }
@@ -0,0 +1,42 @@
1
+ [
2
+ {
3
+ "name": "newsletter-form",
4
+ "description": "A native Ghost members subscription form.",
5
+ "category": "components:ui",
6
+ "ghost_version": ">=5.0.0",
7
+ "files": [
8
+ "newsletter-form.hbs",
9
+ "newsletter-form.css"
10
+ ]
11
+ },
12
+ {
13
+ "name": "pricing-table",
14
+ "description": "Membership tiers and pricing plans with native Ghost Portal checkout triggers.",
15
+ "category": "components:ui",
16
+ "ghost_version": ">=5.0.0",
17
+ "files": [
18
+ "pricing-table.hbs",
19
+ "pricing-table.css"
20
+ ]
21
+ },
22
+ {
23
+ "name": "author-card",
24
+ "description": "Author bio box featuring avatar, biography, social links, and post counts.",
25
+ "category": "components:ui",
26
+ "ghost_version": ">=5.0.0",
27
+ "files": [
28
+ "author-card.hbs",
29
+ "author-card.css"
30
+ ]
31
+ },
32
+ {
33
+ "name": "post-card",
34
+ "description": "Post preview card with feature image, primary tag, excerpt, and reading time.",
35
+ "category": "components:ui",
36
+ "ghost_version": ">=5.0.0",
37
+ "files": [
38
+ "post-card.hbs",
39
+ "post-card.css"
40
+ ]
41
+ }
42
+ ]
@@ -30,6 +30,15 @@ async function fetchWithTimeout(url, timeoutMs = 5000) {
30
30
  }
31
31
  }
32
32
  function findLocalRegistryDir() {
33
+ const bundledCandidates = [
34
+ path_1.default.join(__dirname, 'registry'),
35
+ path_1.default.join(__dirname, '..', 'registry')
36
+ ];
37
+ for (const cand of bundledCandidates) {
38
+ if (fs_1.default.existsSync(cand) && fs_1.default.statSync(cand).isDirectory()) {
39
+ return cand;
40
+ }
41
+ }
33
42
  const searchStarts = [process.cwd(), __dirname];
34
43
  for (const start of searchStarts) {
35
44
  let currentDir = start;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghostcn",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "The shadcn/ui for Ghost CMS themes - component distribution system",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,7 +12,7 @@
12
12
  "dist"
13
13
  ],
14
14
  "scripts": {
15
- "build": "tsc",
15
+ "build": "tsc && node -e \"const fs=require('fs'); const path=require('path'); const src=path.resolve('../../registry'); const dest=path.resolve('dist/registry'); if(fs.existsSync(src)){fs.cpSync(src, dest, {recursive:true});}\"",
16
16
  "prepublishOnly": "npm run build",
17
17
  "start": "ts-node src/index.ts",
18
18
  "dev": "ts-node src/index.ts",