How to Create a Cookbook
Introduction
This playbook will cover all the steps needed to add a new cookbook to the AssemblyAI Docs Repository.
Before You Begin
Note: To use git commands in the terminal, make sure you have git installed on your computer.
Make sure that you have a local copy of the docs repo. If not, clone the docs repo onto your local device:
-
Open your terminal, navigate into the folder where you would like to store the Cookbook repo, and type:
git clone https://github.com/AssemblyAI/assemblyai-api-spec.git -
You can now open this repo in your code editor of choice
Procedures
-
Make sure your local repo is up to date
a.
git checkout mainb.
git pull -
Create a new branch and make sure the branch name includes your name and the cookbook name with the word “cookbook:” before it to designate that this is the section where you are making an addition:
git checkout -b \<your-name\>/cookbook:\<cookbook-name\> -
Add an .mdx file into the appropriate folder in fern/cookbooks. Follow the layout of the other .mdx cookbook files to ensure correct formatting.
a. Make sure to replace your API key with
YOUR_API_KEYand audio URLs withYOUR_AUDIO_URLin your cookbook -
Be sure to index the new cookbook by updating the fern/docs.yaml file to include the new cookbook as well as on the cookbook index page.
-
Make sure to commit and push all changes to your branch:
a.
git add .b.
git commit -m "description of changes"c.
git push origin \<branch-name\> -
Return to the docs repo on GitHub where you will be prompted to create a pull request
a. Add a comment describing in a sentence or two the new cookbook that is being added NOTE: If you are using AI generated code, please mention that in the PR
b. Add a reviewer - At this time it should be Mart, but in the future this should be whoever is resource sharer for the week. They will review all PRs at the end of the week.
NOTE: Until we have one source of truth for starter code – if you are updating any of the starter code, make sure to also update the code in the dashboard.
Resources
AssemblyAI Docs Github Repository: https://github.com/AssemblyAI/assemblyai-api-spec