developmentseed / jekyll-hook

No Longer Maintained | A server that listens for GitHub webhook posts and renders a Jekyll site
BSD 3-Clause "New" or "Revised" License
508 stars 83 forks source link

Store config as YAML rather than JSON #5

Closed benbalter closed 11 years ago

benbalter commented 11 years ago

Config should be written for humans, not computers. JSON can be daunting for non-coders, or even non-JS developers, and a single missing comma can break all the things.

YAML is much friendlier on the eyes, and much easier to edit for the uninitiated, lowering the barrier to entry for using Jekyll-hook. Example:

Old Busted

{
    "gh_server": "github.com",
    "temp": "/home/ubuntu/jekyll-hook",
    "scripts": {
        "build": "./scripts/build.sh",
        "publish": "./scripts/publish.sh"
    },
    "email": {
        "user": "", 
        "password": "", 
        "host": "", 
        "ssl": true
    },
    "accounts": [
        "developmentseed",
        "mapbox"
    ]
}

New Hotness

gh_server: github.com
temp: /home/ubuntu/jekyll-hook
scripts:
  build: ./scripts/build.sh
  publish: ./scripts/publish.sh
email:
  user: ""
  password: ""
  host: ""
accounts:
  - developmentseed
  - mapbox

Understand there's a bit of personal preference here, and don't want to start a holy war, so no hard feelings if you think it's best the project stays with JSON. :smile:

dhcole commented 11 years ago

:-/ I think we should stick with JSON, as a built in standard for node.js. Setting up Jekyll-server is technical enough that I think expecting basic JS understanding is an OK barrier.