I put together a quick website that I thought the community might find interesting. Basically, it uses the public API of a ghost website to show statistics about number of posts, words per post, and a few other stats.
It’s a proof-of-concept at this point. The public API is deprecated and will probably go away soon, so I’m thinking about options for connecting the site as a custom integration.
Hey Good Work
I like this Concept
Website detected, but no API found. Are you sure this website uses Ghost and has public API enabled?
How to fix it?
I will post it on GitHub!
It’s just a simple Flask app running on Heroku. It looks for the API keys exposed in the head. For example:
Then it builds an API request and charts that data.
(edit: I added functionality for content API too)
What’s the website address?
Make sure your Public API is enabled. In your website settings go to Labs > Public API.
You will probably need to change some code on your app at some point because Public API is deprecated. You will need to use Ghost’s Content API. Users will need to somehow comunicate between their blog and your app with an integration. Ghost API Versioning.
It is my case. I have the nevest version of Ghost. Content API V2 is great, but possibility of expose the public API v0.1 vanished from admin panel.
Hi Daniel, I just updated the website so it should work now. However, you need to make a custom integration:
- Go to Settings > Integrations > Add Custom Integration
- Name the integration “GhostGraphs”
- Then copy the “Content API Key”
- Go to Settings > Code Injection
- Add the following to your blog header, replacing “content” with the API key you copied
<!-- GhostGraphs.com -->
<meta name="ghostgraphs" content="7731dea759b0b453e5e2c7a9d7" />
Then it should work! Let me know if it doesn’t.
Thanks for the code Forked
Made some minor updates to the site. If you’d like to be featured on the website, please let me know!
If you wouldn’t mind featuring https://www.codetips.co.uk