A custom element (a.k.a. web component) to display the latest notes from a Ghost blog's ActivityPub feed.
- Zero dependencies - pure vanilla JavaScript web component
- Displays profile header with name, username, image, and summary
- Shows the latest notes from the ActivityPub feed
- Renders note content and attached image
- Formats and displays post dates
- Handles errors gracefully
- Customizable with CSS
Import the component to your Ghost page (by Ghost's code injection or your template):
<script src="https://cdn.jsdelivr.net/npm/ghost-activitypub-feed@latest/ghap-embed.js"></script>
And use it by adding component to wherever you want to show the feed:
<ghost-activitypub-embed></ghost-activitypub-embed>
You can use a Ghost HTNL Card to embed the component or edit your theme directly.
url
- The base URL of your Ghost blog with ActivityPub enabled. By default it's the domain of your current page.
You can customize the component using CSS variables and using CSS part()
selector.
Details will be added soon.
- The Ghost blog must have ActivityPub integration enabled and configured
- Modern browser with Web Components support
Clone the repository and install dependencies:
git clone https://github.com/YOUR_USERNAME/ghost-activitypub-feed.git
cd ghost-activitypub-feed
npm install
Start the development server:
npm run dev
Build for production:
npm run build
Contributions are welcome! Please feel free to submit a Pull Request.
MIT