This repo is a hugo site that generates a JSON api. You add data by adding markdown files, and github pages hosts the API.
The generated site and api can be seen at https://codeforphilly.github.io/balancer-data/
You can see the medication list json at https://codeforphilly.github.io/balancer-data/api/medications/index.json
The list of symptoms is at https://codeforphilly.github.io/balancer-data/api/symptoms/index.json
To add data you can use the hugo command line tool to create a new file for you using the archetype template. Or you can create or edit an existing markdown file.
If you are on a mac you can use Homebrew to install Hugo by running brew install hugo
.
Once you have hugo, in this project's working directory you can create a new medication by running
hugo new api/medications/med-name.md
This will create a markdown file in content/api/medications/med-name.md
. If you have no other information to add, then you can commit and push up the file and it will be added to the list.
To run the hugo server locally, run
hugo serve
This will run the hugo server locally, and you can navigate to http://localhost:1313/balancer-data/
to see the site and API running.