---
title: Adding Vocabulary
sidebar:
  order: 2
---

I started adding more words using the YAML file, but quickly got a bit annoyed by the repetitiveness of having to type:

```yaml
- type: [part-of-speech]
  english: [word]
  hindi: [translation]
```

even for words that didn't have more complexity, like examples, notes, references ("see also"), etc. 

Pretty much as soon as I popped open my textbook and tried to start entering larger batches of vocabulary -- the list of vocations, for example -- I found myself wanting a more quick flow. Essentially, I was wanting a form.

Since I'm using Astro, I knew I'd be able to add a React component, so I made a page that would modify the yaml file based on a form. But in production, once deployed, I somehow needed to modify the *repository*'s copy of the yaml file, not the one sitting in a docker container. 

The first stab was to implement a Github api to edit the file, but this would trigger a ~2 minute redeployment after every word was added, which was needed before the static site generation would regenerate the sidebar and pages.

All of this meant that my actual rate of adding words was pretty slow.