मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)56k · #3280

build-ghost-app

यह क्या करती है

यह स्किल AI एजेंट को ऐसा Ghost ऐप बनाने में मार्गदर्शन देती है जो Ghost Admin के अंदर चलता है। यह उन डेवलपर्स के लिए है जो Ghost में अपना पेज या टूल जोड़ना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप नया Ghost ऐप शुरू करते हैं और चाहते हैं कि वह Ghost Admin के अंदर दिखे।
  • ✓जब आपको manifest फ़ाइल लिखनी है जो Ghost को आपके ऐप के बारे में बताती है।
  • ✓जब आप app SDK से अपने ऐप को Ghost Admin से जोड़ना और install करना चाहते हैं।

Skill का लिंक

https://github.com/TryGhost/Ghost/blob/main/apps/shade/dev-skill/ghost-app-ui-dev-setup/build-ghost-app/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/TryGhost/Ghost/blob/main/apps/shade/dev-skill/ghost-app-ui-dev-setup/build-ghost-app/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं Vite और React के साथ एक Ghost ऐप शुरू करना चाहता हूँ जो मेरे Ghost Admin के अंदर दिखे।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट एक Vite और React प्रोजेक्ट सेट करता है, Ghost app SDK इंस्टॉल करता है, और एक manifest फ़ाइल लिखता है। फिर वह ऐप को एक तय लोकल पोर्ट पर चलाता है, ताकि Ghost Admin उसे लोड कर सके।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Build a Ghost app

A Ghost app runs as a full page in a frame inside Ghost Admin. Build it in this folder, the one with AGENTS.md, as a Vite, React and TypeScript app with npm. These steps make it show up in Admin. For its screens, use the build-ghost-app-ui skill.

npm create vite won't scaffold into a folder that already has files without --overwrite, which deletes them. Scaffold into a new subfolder, then move its files up into this folder and remove the subfolder.

Connect the app

  1. SDK. @tryghost/app-sdk isn't on npm yet. Install it from the folder: npm install ./vendor/tryghost-app-sdk.tgz. It brings its one dependency, @quilted/threads.

  2. Fixed port. In vite.config.ts, set server: { port: 5190, strictPort: true }. The install link depends on the port.

  3. Manifest. Serve it as public/ghost-app.json, so it's at http://localhost:5190/ghost-app.json:

    {
      "id": "org.example.<app-slug>",
      "name": "<App name>",
      "description": "<One sentence on what the app does.>",
      "author": { "name": "<Author>", "url": "https://example.com" },
      "accent_color": "#<six-digit hex>",
      "icon": { "name": "<icon-name>" },
      "surfaces": [{ "type": "admin_page", "url": "/" }]
    }
    

    Every field is required, author.url too, and Admin rejects fields it doesn't know. icon.name is any Lucide icon name in kebab case, such as megaphone or layout-list; Admin draws it on accent_color.

  4. Connect before rendering. Admin keeps the frame hidden until the app calls connect(), and gives up after 10 seconds. In src/main.tsx, await it before rendering React:

    import { connect, GhostAppError } from '@tryghost/app-sdk'
    
    try {
      const ghost = await connect()
      // apply ghost.theme.mode (step 5), then render the app
    } catch (error) {
      if (error instanceof GhostAppError && error.code === 'not_framed') {
        // Opened outside Admin: render only a short "Open this app in Ghost Admin" message
      } else {
        // Render a short "Couldn't connect to Ghost" message with error.message
      }
    }
    

    Opened directly at http://localhost:5190/, the page isn't framed, so it shows only that message. That's expected.

  5. Theme. ghost.theme.mode is 'light' or 'dark', and ghost.onThemeChange(theme => …) fires when the publisher switches; it returns a function that unsubscribes. Apply the mode before the first render and follow changes. How Shade takes the mode is in the build-ghost-app-ui skill, at its "Light and dark theme" step.

  6. Install link. With npm run dev running, the publisher installs the app from: http://localhost:2368/ghost/#/apps/install?manifest=http%3A%2F%2Flocalhost%3A5190%2Fghost-app.json

Hand over

You can't open Ghost Admin yourself, so the publisher checks the app there. When you're done, check that npm run dev starts on port 5190 and npm run build passes, stop the dev server, and give them the install link with anything they should check in Admin.

अक्सर पूछे जाने वाले सवाल

ऐप कौन सा पोर्ट इस्तेमाल करता है?

स्किल ऐप को strict mode में पोर्ट 5190 पर सेट करती है, क्योंकि install लिंक उसी पोर्ट पर निर्भर है।

manifest फ़ाइल कहाँ जाती है?

वह public फ़ोल्डर में ghost-app.json के रूप में जाती है, ताकि वह ऐप के लोकल पते पर मिले।

क्या यह स्किल ऐप की स्क्रीन भी कवर करती है?

नहीं। स्क्रीन के लिए स्किल एक अलग build-ghost-app-ui स्किल की ओर इशारा करती है।

जानकारी

लेखक का मूल विवरण

Connect a Ghost app to Ghost Admin with the app SDK, and serve its manifest and install link. Use when building a Ghost app, connecting it to Admin, writing its manifest or installing it.

repo: TryGhost/Ghost

लोकप्रियता

GitHub स्टार
56k
रैंकिंग में स्थान
#3280
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills