Ghost is an open-source content management system (CMS) focused on publishing and blogging. It offers a minimalist interface for content creation. It is lightweight, fast, and designed for bloggers and publishers.
Use Cases: Blogs, news websites, and content-driven sites.
Enhancing your website with a chatbot can significantly improve user interaction and engagement. Whether you’re looking to provide 24/7 customer support, generate leads, or guide users through your site, a chatbot can be a valuable addition. In this tutorial, we will show you how to integrate the DigitalOcean GenAI chatbot into your existing Ghost powered website. It is an AI-powered chatbot platform that can be easily integrated into any website using a simple script.
We’ll walk you through the steps of adding the chatbot using different methods, including code injection, plugins, and direct theme file edits. Here you can provide clear instructions for the agent and train on how to respond.
These instructions define the agent’s task, tone, and behavior, improving its accuracy. Knowledge bases (KB) can include documentation, FAQs, and guides that will help your agent to fetch relevant information for more accurate responses.
DigitalOcean GenAI Platform is a powerful offering for building AI agents on GPU-powered infrastructure. It allows you to create AI applications with foundation models, agent routes, knowledge bases, and Retrieval-Augmented Generation (RAG) pipelines. The platform is available in Early Availability (EA). Sign up for EA and get started here.
Here are a few scenarios where adding a chatbot using DigitalOcean GenAI to your Ghost site can make a significant impact:
Before you begin adding the DigitalOcean GenAI chatbot to your site, ensure that you meet the following prerequisites:
<script>
tag that you find in the cloud panel once you make the endpoint public. You can refer to the links for more details on creating and managing GenAI agents and Knowledge Bases.Ensures your agent is available for external applications. If an endpoint is set to playground mode, this restricts access to internal resources only such as for agent routing. If an endpoint is set to public, the endpoint becomes accessible to external traffic.
Once you have your chatbot ready and configured, set the endpoint to public. Then, you will be provided with a JavaScript code snippet. For example:
<script async
src="https://agent-14066a373cb3ac799541-5kekp.ondigitalocean.app/static/chatbot/widget.js"
data-agent-id="7ff110ef-9da8-11ef-bf8f-4e013e2ddde4"
data-chatbot-id="ZoamtI2KXJusoNBYbbD5lgoWX2hLfH-J"
data-name="ghostblog-chatbot Chatbot"
data-primary-color="#031B4E"
data-secondary-color="#E5E8ED"
data-button-background-color="#0061EB"
data-starting-message="Hello! How can I help you today?"
data-logo="/static/chatbot/icons/default-agent.svg">
</script>
This will add the chatbot widget to every page of your website. Open your website and verify that the chatbot appears and works as expected.
If you want more control over where the chatbot appears, you can directly edit your Ghost theme files.
.zip
file.Refresh your Ghost website to ensure the chatbot appears as expected.
If you’re using a self-hosted Ghost blog (especially on Docker), you can use Ghost Apps or Docker services to add custom scripts:
.env
file or your Docker configuration file to include chatbot scripts.Adding a DigitalOcean GenAI Chatbot to your Ghost website is a great way to engage visitors and provide instant support.
This integration offers several key benefits:
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!