I’m running the latest Ghost with Casper, and I want to post podcasts. As of now, there’s no good way to do that, and due to lack of podcasters using Ghost, I don’t expect this to become core functionality. Here’s what I’m trying to accomplish:
- When a post contains an .mp3 url, it will become a podcast
- Some code will be injected right above this URL and will display an HTML5-compatible player (say,
- URL itself will be updated to a proper link: “Download Episode #xxx”
- A proper enclosure tag will be created and injected into the post as invisible code (?)
- This enclosure will be available for this particular post in RSS for further syndication
- This updated post will be saved back into the database
I’m not really sure about the best way to approach this. I’ve been able to make points 1 through 3 work with
content helper, so whenever there’s an mp3 url in the post, it becomes a media player with the download link below.
How do I add an enclosure to the post so it appears in the RSS? And what’s the proper way to take this whole post object afterwards and post it back to the database as an update (I’m using MySQL at the time)?
Any suggestions and pointers are very welcome, as documentation is limited and not always clear about accomplishing this kind of thing. Thank you!