Getting started with MuxFM Glue
Introduction
Glue helps you convert your Anchor FM podcast feed into a JSON API. This API is then used to generate a static site.
It also replaces the epidsode links inside the feed, to point to your static site instead of Anchor. Github Actions are used for the transformation.
Installation
After you've created your Anchor account and podcast, you can get started with MuxFM Glue.
- Clone the 
muxfm/glueproject: https://github.com/muxfm/glue - Setup required secrets
 
ANCHOR_USERNAMEis your Anchor usernameSITE_BASEis your website's base URL with no trailing slash, ex: https://muxfmcast.com
- Open a new issue in the GitHub repository (this will be issue #1)
 - If you comment 
buildon this issue, GitHub Actions will trigger a build 
Build Process
When you comment build on the first issue, Glue starts the build process. 
It starts by fetching the public podcast page hosted at https://anchor.fm/muxfmcast. muxfmcast is the username set in ANCHOR_USERNAME secret.
Feed Transformation
The html source of this page is parsed to figure out the podcast xml feed url. The feed is downloaded to a temporary folder. Glue then replaces links pointing to Anchor FM, with links that point to your site.
If the feed from Anchor had the following link:
The transformed feed will reflect your site instead of Anchor:
This link doesn't exist obviously, but you need to create it. You can use the provided site which takes care of the links automatically. You can also use the ui components, to create a site from scratch.
JSON API
After transforming the feed, Glue proceeds to create a JSON API. This API exposes three entities:
- Meta - The name, url, profile photo etc of the podcast itself
 - Episodes Index - The list of each episode
 - Individual Episode - All info about a single episode
 
The entities are computed from the feed and saved as JSON files on the gh-pages branch. 
- Meta data is available at 
/meta.json - Episodes index is at 
/episodes/index.jsonand - Individual episodes can be found at 
/episodes/<slug>.json 
The slug for each episode is present as a key-value pair in index.json.
NOTE: You need to comment build on the first issue each time you publish a new episode on Anchor.
Exposing end-points via Github Pages
To consume the generated API, you need to enable Github Pages on the gh-pages branch. If your repo address is https://github.com/ux0/glue, then your API will be available at ux0.github.io/glue/meta.json.
Once the API starts working, you can start configuring the site.