Listen to your blog on Amazon Alexa / Echos
What is actually does
alexafeed.json is a Jekyll plugin that will create a Alexa Flash Briefing compatible json feed. That means people can listen to your latest posts in their flash briefings -- instead of reading them. It's like an instant podcast using Alexa's built in speech engine.
This plugin takes the latest 3 posts from the current day and creates a little json file with the text content. The post content is html stripped, and new lines are replaced with spaces, so the json validates. As written, the entire post is used, but you can customize this to just use excerpts (recommended, see below).
So here's the thing - all my blogs are on hiatus right now. But, just, download this and try it out for yourself. Then once your skill is live, email me at email@example.com and I'll list your Skill URL here :)
Your feed should look something like the examplefeed.json
How to use alexafeed
I'm going to assume that you already have a standard, live, working Jekyll blog that's deployed to a public server.
Additionally, I'm going to assume that you update it at least daily - if not, your content will get stale quickly and nobody wants to hear the same story over and over in their briefing - especially if it's long.
- Download alexafeed.json and place it in the root folder of your Jekyll blog.
- Generate your site, and verify that
http://youre.site/alexa.json is producing valid json.
- Follow all the steps in this tutorial and input your site URL in step 8.
- Enable your skill by opening the Alexa app on your phone, navigating to the Skills tab, clicking Your Skills, and selecting your Flash Briefing Skill.
- Say "Alexa, what’s my Flash Briefing?" to your Echo.
- Pat yourself on the back and have a beer.
- Submit your skill for certification.
- Upon certification, tell all your friends to add your Skill to their Briefing (Alexa skills do have URLs)
Flash briefing feeds support between 1 and 5 items, so change the
limit:3 depending on how frequently you publish new content.
post.excerpt on line 12 if you don't want Alexa to read out your entire post. Excerpts cut content at the first
\n\n. I'd actually recommend doing this if your posts exceed 500 words.
streamURL is set as null, because as designed, this is a text-to-speech feed, unlike the NPR feeds which are audio driven. If you want to instead use audio, you'll need to host audio, include a filename pointer in your post markdown, and change the briefing type of your skill.